Skip to content

Commit

Permalink
Use errortrace-key instead of DrRacket's own key.
Browse files Browse the repository at this point in the history
This is so we can pick it up in the teaching languages for
reporting error locations.
  • Loading branch information
mikesperber committed Sep 7, 2024
1 parent f747ddd commit 43bceac
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 25 deletions.
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.

4 changes: 2 additions & 2 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 @@ -216,7 +216,7 @@
(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)]
[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
6 changes: 3 additions & 3 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,7 +171,7 @@

(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))
Expand Down

0 comments on commit 43bceac

Please sign in to comment.