[racket] regression in raco exe or raco distribute in 5.3.1 ?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Nov 11 11:39:04 EST 2012

The problem is the `lazy-require' that commit 949d12e2c6 says "does not
seem to cause [...] trouble".

I'm not sure what changed to make the suspicious `lazy-require'
problematic after all, but I've changed `lazy-require' to fix it. It
should be ok to use `lazy-require' in `begin-for-syntax' from now on.

The root of the problem is that `define-module-path' and friends do not
work right at phase levels other than 0. I haven't figured out a
general solution to that problem, but I have a general workaround
(which is now in the documentation): put the use of
`define-module-path' in a submodule, and then the submodule can be
imported at any phase level. The expansion of `lazy-require' now does
that.

Along the way, I also fixed bugs related to `require' inside
`begin-for-syntax' and submodules with `raco exe'. Also, `lazy-require'
now creates module dependencies more correctly (e.g., if a
lazily-required module is triggered at compilation time for some other
module), and that improvement needed an addition to
`compiler/cm-accomplice'.


A workaround for v5.3.1 is to add

 (require (for-syntax racket/match/parse))

to your program. You might also be able to adjust some uses of `match'
to avoid the problem, because only certain patterns (such as `pregexp'
patterns) expose the bug.


At Fri, 09 Nov 2012 21:23:14 -0500, Neil Van Dyke wrote:
> My app, built using "raco exe" and "raco distribute", works in 5.3 but 
> not 5.3.1.
> 
> With a clean build under 5.3.1, invoking the app binary gives the error:
> 
> standard-module-name-resolver: collection not found
>    collection: "racket/match"
>    in collection directories:
>     /home/user/racket/rackout/dist-tree/lib/plt/rackout/collects
>    context...:
>     standard-module-name-resolver
>     #%embedded:g6830:mime-types: [running body]
>     #%embedded:g6537:servlet-env: [traversing imports]
>     #%embedded:g6514:serve: [traversing imports]
>     #%embedded:g5856:dispatch: [traversing imports]
>     #%mzc:rackout: [traversing imports]
>     loop
> 
> However, clean build under 5.3 works fine.
> 
> Running the code as "racket -t myfile.rkt" works fine in both versions.
> 
> Or, rather than cause being in raco exe/distribute, I guess it could be 
> in some trickery of "web-server".
> 
> Neil V.
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.