I'm using Racket 6.8, and I'm getting a weird error when attempting to run an EXE created with raco exe
when the project includes a (place)
form in a module require
d from the main module.
This can be reproduced with the following setup:
main.rkt
#lang racket
(require "place.rkt")
(module+ main
(sync (place-dead-evt (start-place))))
place.rkt
#lang racket
(provide start-place)
(define (start-place)
(place pch
(displayln "Hello from a place!")))
If I run with the Racket interpreter, this works totally fine:
$ racket main.rkt
Hello from a place!
#<place-dead-evt>
If I create an EXE using raco exe
however, I get the following:
$ raco exe -o place main.rkt
$ ./place
dynamic-require: unknown module
module-name #<resolved-module-path:(submod '#%embedded:g2133:place place-body-1)>
#<place-dead-evt>
If I move the (start-place)
function to main.rkt, the executable works correctly. However I'd prefer to not do that in my main project I'm working on.
Is there any way to invoke raco exe
so that this works correctly? I tried including place.rkt with the ++lib
option, but that results in raco
crashing.