0

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 required 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.

Chris Vig
  • 8,552
  • 2
  • 27
  • 35
  • You know. I think this is a bug. Would you mind reporting it?: https://github.com/racket/racket/issues – Leif Andersen Jun 03 '17 at 23:31
  • @LeifAndersen - sure, I added it at https://github.com/racket/racket/issues/1712. Thanks! – Chris Vig Jun 04 '17 at 00:15
  • Ah yes, thank you. I suspect the problem is how place is calling `dynamic-require`, but I am not familiar enough with the place library to know how to track down the bug. Thank you for opening an issue though. :) – Leif Andersen Jun 04 '17 at 13:03

0 Answers0