Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use errortrace-key instead of DrRacket's own key. #679

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drracket/drracket/private/debug.rkt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#lang racket/base

(require "drracket-errortrace-key.rkt"
racket/unit
(require racket/unit
racket/contract
errortrace/stacktrace
errortrace/errortrace-key
racket/class
racket/path
racket/bool
Expand Down Expand Up @@ -68,7 +68,7 @@
(define (cms->srclocs cms)
(map
errortrace-stack-item->srcloc
(continuation-mark-set->list cms drracket-errortrace-key)))
(continuation-mark-set->list cms errortrace-key)))

;; type debug-source = (union symbol (instanceof editor<%>))

Expand Down Expand Up @@ -718,7 +718,7 @@
[else #f]))
(define with-mark (make-with-mark special-source-handling-for-drr))

(define key-module-name 'drracket/private/drracket-errortrace-key)
(define key-module-name 'errortrace/errortrace-key)

;; current-backtrace-window : (union #f (instanceof frame:basic<%>))
;; the currently visible backtrace window, or #f, if none
Expand Down
12 changes: 0 additions & 12 deletions drracket/drracket/private/drracket-errortrace-key.rkt

This file was deleted.

8 changes: 5 additions & 3 deletions drracket/drracket/private/eval-helpers-and-pref-init.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pkg/lib
framework/preferences
errortrace/stacktrace
"drracket-errortrace-key.rkt"
errortrace/errortrace-key
(prefix-in *** '#%foreign) ;; just to make sure it is here
"compiled-dir.rkt")

Expand Down Expand Up @@ -215,8 +215,10 @@
(define line (or (syntax-line src-stx) 0))
(define column (or (syntax-column src-stx) 0))
(with-syntax ([expr expr]
[mark (vector source line column position span)]
[et-key (syntax-shift-phase-level #'drracket-errortrace-key phase)]
; errortrace/stacktrace puts the shrunken source expression at the car
; this needs to be alligned with errortrace-stack-item->srcloc
[mark (list #f source line column position span)]
[et-key (syntax-shift-phase-level #'errortrace-key phase)]
[wcm (syntax-shift-phase-level #'with-continuation-mark phase)]
[qte (syntax-shift-phase-level #'quote phase)])
(syntax
Expand Down
2 changes: 1 addition & 1 deletion drracket/drracket/private/eval.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
(list ''#%foreign
'(lib "mzlib/pconvert-prop.rkt")
'(lib "planet/terse-info.rkt")
'(lib "drracket/private/drracket-errortrace-key.rkt")
'(lib "errortrace/errortrace-key.rkt")
'(lib "simple-tree-text-markup/data.rkt")
; srclocs-special<%>
'(lib "simple-tree-text-markup/port.rkt")
Expand Down
2 changes: 1 addition & 1 deletion drracket/drracket/private/expanding-place.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,5 @@
(define profiling-enabled (make-parameter #f))
(define (register-profile-start key) (void))
(define (register-profile-done key start) (void))
(define key-module-name 'drracket/private/drracket-errortrace-key)
(define key-module-name 'errortrace/errortrace-key)
(define-values/invoke-unit/infer stacktrace/errortrace-annotate/key-module-name@)
4 changes: 2 additions & 2 deletions drracket/drracket/private/language-configuration.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -2016,8 +2016,8 @@
(super on-execute setting run-in-user-thread)
(run-in-user-thread
(λ ()
(namespace-require 'drracket/private/drracket-errortrace-key)
(namespace-require '(for-syntax drracket/private/drracket-errortrace-key)))))
(namespace-require 'errortrace/errortrace-key)
(namespace-require '(for-syntax errortrace/errortrace-key)))))
(super-new)))

(define (r5rs-mixin %)
Expand Down
13 changes: 5 additions & 8 deletions drracket/drracket/private/stack-checkpoint.rkt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#lang racket/base
(require "drracket-errortrace-key.rkt"
racket/class
(require racket/class
racket/contract
racket/gui/base
racket/math
racket/match
framework
errortrace/errortrace-key
"interface.rkt")
(module+ test (require (rename-in rackunit [check r:check]) racket/list racket/bool))

Expand Down Expand Up @@ -171,17 +171,14 @@

(define (cms->errortrace-viewable-stack cms interesting-editors
#:share-cache [a-viewable-stack #f])
(build-viewable-stack (continuation-mark-set->list cms drracket-errortrace-key)
(build-viewable-stack (continuation-mark-set->list cms errortrace-key)
errortrace-stack-item->srcloc
interesting-editors
a-viewable-stack))

; this needs to be alligned with make-with-mark
(define (errortrace-stack-item->srcloc x)
(make-srcloc (vector-ref x 0)
(vector-ref x 1)
(vector-ref x 2)
(vector-ref x 3)
(vector-ref x 4)))
(apply make-srcloc (cdr x)))

(define (cms->builtin-viewable-stack cms interesting-editors
#:share-cache [a-viewable-stack #f])
Expand Down
Loading