raco exe: fix declare-preserve-for-embedding submodule

This commit is contained in:
Matthew Flatt 2018-09-01 15:44:22 -06:00
parent 8c5eebc513
commit 3127bc239b
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,16 @@
#lang racket/base
;; check that `declare-preserve-for-embedding` works
(module keep-me racket/base
(module declare-preserve-for-embedding racket/base)
(define kept "This is 31.\n")
(provide kept))
(display
(dynamic-require (module-path-index-join
'(submod "." keep-me)
(variable-reference->module-path-index
(#%variable-reference)))
'kept))

View File

@ -265,7 +265,8 @@
(one-mz-test "embed-me17.rkt" "This is 17.\n" #f)
(one-mz-test "embed-me18.rkt" "This is 18.\n" #f)
(one-mz-test "embed-me19.rkt" "This is 19.\n" #f)
(one-mz-test "embed-me21.rkt" "This is 21.\n" #f))
(one-mz-test "embed-me21.rkt" "This is 21.\n" #f)
(one-mz-test "embed-me31.rkt" "This is 31.\n" #f))
;; Try unicode expr and cmdline:
(prepare dest "unicode")

View File

@ -620,7 +620,9 @@
(if (is-lib-path? module-path)
;; Preserve `lib`-ness of module reference:
(collapse-module-path-index
(module-path-index-join mp module-path))
(module-path-index-join
mp
(module-path-index-join module-path #f)))
;; Ok to collapse based on filename:
(collapse-module-path-index mpi filename))
m))