I made a little repo to have Travis CI run this on various Racket versions back to 5.3.4:
https://travis-ci.org/greghendershott/errortrace-submod-namespace/builds/80868223 Apparently it's "never" worked up through 6.2.1. But does now work in HEAD, as you said. As for the desirability of a work-around: I'm not sure, yet. I got sidetracked yesterday by trying to make this work, at all. Now I'd like to flesh out the feature in racket-mode, and get a feel for it in real use. It might affect how I improve an existing feature, the one to run tests. Currently this essentially just types (require (submod "." test)) in the REPL, for you. Which is useful, but it would be handier if it left you _in_ the test submodule namespace (it would be easier to play with existing tests, write new ones, etc.). So probably I'd like to make that feature just a special case of entering submodules, generally. However I couldn't do that, quite so simply, without a work-around for older Rackets (the run-tests feature needs to at least work as it does now, with older Rackets). [I do have places where I dynamic-require X with a fallback if it doesn't exist. That's not too bad; at least it's a capability-available flavor test. But that wouldn't work in this case, I'd need to check a Racket version number, which I don't love but I guess it's not the end of the world.] On Thu, Sep 17, 2015 at 11:38 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > Ah, I forgot to try DrRacket v6.2, and I do see the problem there. > > I don't see the problem with DrRacket or errortrace in the current > development version, though. I think you're right that it should work, > and it looks like the problem has been fixed for the next version (but > it would be great if you can check that). > > I can't guess offhand what the fix was, and I can't yet suggest a > workaround for v6.2. How much do you need a workaround? > > At Thu, 17 Sep 2015 11:15:40 -0400, Greg Hendershott wrote: >> On Thu, Sep 17, 2015 at 10:21 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: >> > Can you say more about how you're running this program? I get `42` all >> > four times when running this program with `racket` or in DrRacket. >> >> Well I could have sworn I got the error to happen last night in plain >> racket. Apparently I was debugging too many things, too long, and got >> confused. >> >> 1. I get the same result as you with plain racket 6.2: >> >> $ racket sub.rkt >> 42 >> 42 >> 42 >> 42 >> >> >> 2. The error comes with using errortrace: >> >> $ racket -l errortrace -t sub.rkt >> 42 >> 42 >> x: undefined; >> cannot reference an identifier before its definition >> in module: (submod "/tmp/sub.rkt" sub/module*/#f) >> errortrace...: >> /tmp/sub.rkt:8:2: (eval (quote x) ns) >> /tmp/sub.rkt:22:0: (eval-x-in-submodule-namespace >> (quote-module-path sub/module*/#f)) >> context...: >> /tmp/sub.rkt: [running body] >> >> >> 3. Unlike you I do also get the error in DrRacket -- even with the >> Language settings at "No debugging or profiling" [which IIUC ~= no >> errortrace], "Preserve stracktrace" off, and "Enforce constants" on: >> >> Welcome to DrRacket, version 6.2 [3m]. >> Language: racket/base [custom]; memory limit: 128 MB. >> 42 >> 42 >> x: undefined; >> cannot reference an identifier before its definition >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.