Racket: raco exe fails with typed/racket/base

Created on 18 Feb 2019  路  3Comments  路  Source: racket/racket

What version of Racket are you using?

Racket v7.2
edit: also tried this with the 20190216-0567527be4 snapshot build, same result

What platform are you using?

Linux x86-64

What program did you run?

test.rkt:

#lang typed/racket/base

Then I ran the following:

$ raco exe test.rkt

What should have happened?

An executable should be created in the current directory

If you got an error message, please include it here.

instantiate: unknown module
  module name: #<resolved-module-path:(submod "/home/michael/test.rkt" #%contract-defs-reference)>
  context...:
   namespace-module-instantiate!96
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   perform-require!78
   for-loop
   [repeats 1 more time]
   finish
   pass-1-and-2-loop
   module-begin-k
   expand-module16
   expand-capturing-lifts
   temp118_0
   /usr/share/racket/collects/compiler/embed.rkt:421:0: get-code
   /usr/share/racket/collects/racket/private/map.rkt:267:2: gen-for-each
   /usr/share/racket/collects/compiler/embed.rkt:1130:0: do-write-module-bundle
   ...

edit: if I run raco demod test.rkt before running raco exe test.rkt, the operation completes successfully.

Most helpful comment

@MichaelMMacLeod - thanks for the report.

@gryfft - thanks for tracking down the relevant change.

Compiling first with raco make text.rkt allows raco exe to work, too (and that may be related to why we didn't detect the problem sooner). I'll make sure there's a test for the not-compiled case.

All 3 comments

This seems to work on Racket 7.1 and earlier

I believe that the bug was introduced in 9ce4dd8, since commenting lines 553-558 of embed.rkt seems to be a workaround.

@MichaelMMacLeod - thanks for the report.

@gryfft - thanks for tracking down the relevant change.

Compiling first with raco make text.rkt allows raco exe to work, too (and that may be related to why we didn't detect the problem sooner). I'll make sure there's a test for the not-compiled case.

Was this page helpful?
0 / 5 - 0 ratings