racket
racket copied to clipboard
Errortrace breaks in non-Racket REPL
What version of Racket are you using? e.g., v8.15
What program did you run? Please include a short example that triggers the bug
Let test.scrbl be an empty Scribble file:
#lang scribble/base
;; EOF
It does not work with errortrace in REPL:
$ racket
Welcome to Racket v8.15.0.12 [cs].
> (require errortrace)
> (enter! "test.scrbl")
<pkgs>/errortrace-lib/errortrace/private/utils.rkt:34:14: begin: unbound identifier;
also, no #%app syntax transformer is bound
at: begin
in: (begin (#%require (for-meta 1 errortrace/errortrace-key)) (#%require (for-meta 0 errortrace/errortrace-key)))
[,bt for context]
What should have happened?
The program loads just like the case without errortrace:
Welcome to Racket v8.15.0.12 [cs].
> (enter! "test.scrbl")
"test.scrbl"> title
#<procedure:title>
"test.scrbl"> section
#<procedure:section>
"test.scrbl"> 1234
1234
"test.scrbl"> (+ 5 3)
If you got an error message, please include it here.
<pkgs>/errortrace-lib/errortrace/private/utils.rkt:34:14: begin: unbound identifier;
also, no #%app syntax transformer is bound
at: begin
in: (begin (#%require (for-meta 1 errortrace/errortrace-key)) (#%require (for-meta 0 errortrace/errortrace-key)))
[,bt for context]
EDITED: for #lang htdp/isl+ v7.9 did work but for .scrbl it doesn't.
This works in v7.9 (BC) but breaks in v8.0 (BC).
●[Jan15 12:43:35] $ ..../v79-bc/bin/racket
Welcome to Racket v7.9 [bc].
> (require errortrace)
> (enter! "my-code.rkt")
1/10
#<procedure:my-add1>
"my-code.rkt"> (my-add1 3)
; application: not a procedure;
; expected a procedure that can be applied to arguments
; given: 3
; [,bt for context]
"my-code.rkt"> ,bt
; application: not a procedure;
; expected a procedure that can be applied to arguments
; given: 3
; arguments...:
; 9
; errortrace...:
; ..../my-code.rkt:6:5: (x 9)
; ..../my-code.rkt:6:2: (* (x 9) 2)
; context...:
; ..../my-code.rkt:5:0: my-add1
; ..../v79-bc/share/pkgs/xrepl-lib/xrepl/xrepl.rkt:1493:0
; ..../v79-bc/collects/racket/repl.rkt:11:26
"my-code.rkt"> ^D