Closed sorawee closed 2 years ago
Running non-module
start Racket with the -l option before the arguments to load your program: racket -l errortrace ...
I tried
racket -l errortrace -f my-prog.rkts
wheremy-prog.rkts
is simply a file with content1
. However, it results in:#%top-interaction: unbound identifier; also, no #%app syntax transformer is bound at: #%top-interaction in: (#%top-interaction . 1)
This is really a Racket command-line argument corner case. The following instruction will work:
$ racket -l racket/init -l errortrace -f my-progs.rktl
Here the tricky point is that when Racket is given a single -f
instruction, it will first load <init-lib>
, enabling top-level interactions. But when the -l errortrace
appears before the -f
instruction, <init-lib>
is no longer automatically loaded into the namespace.
$ racket -h
...
Default options:
If only configuration options are provided, -i is added
If only configuration options are before the first argument, -u is added
If -t/-l/-p/-u appears before the first -i/-e/-f/-r, -n is added
<init-lib> defaults to racket/init
Switch syntax:
Multiple single-letter switches can be collapsed, with arguments placed
after the collapsed switches; the first collapsed switch cannot be --
Example: `-ifve file expr' is the same as `-i -f file -v -e expr'
Start-up sequence:
1. Set `current-library-collection-paths'
2. Require `(lib "<init-lib>")' [when -i/-e/-f/-r, unless -n]
3. Evaluate/load expressions/files in order, until first error
...
a bit late to the party,
I really can't get raco setup --mode errortrace --pkgs
to work, even after deleting compiled directory in .
@sorawee, you need -j 1. see #25
This issue is completed, right?
Yep
Running non-module
I tried
racket -l errortrace -f my-prog.rkts
wheremy-prog.rkts
is simply a file with content1
. However, it results in:Note that running
racket -f my-prog.rkts
works correctly. Also note that(require errortrace)
works correctly.Compiling collections
I really can't get
raco setup --mode errortrace --pkgs <pkg-name>
to work, even after deletingcompiled
directory in<pkg-name>
.