raco exe: handle failing submodule search correctly

An attempt to detect a submodule could trigger the original module
name resolver when the would-be enclosing module would be handled
by the embedding-specific resolver. When a submodule is not found
but its would-be enclosing module is embedded, then assume that
the default resolver wouldn't find the submodule, eithe --- and
therefore avoid a potential "collection not found" error.

original commit: 3fb12b4ff4
This commit is contained in:
Matthew Flatt 2012-09-23 10:47:24 -05:00
parent 841bbb465d
commit f6441369d9
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#lang racket/base
(require racket/runtime-path)
(define-runtime-module-path plai plai)
(define-runtime-module-path plai-reader plai/lang/reader)
(parameterize ([read-accept-reader #t])
(namespace-require 'racket/base)
(eval (read (open-input-string "#lang plai 10"))))
(with-output-to-file "stdout"
(lambda () (printf "This is 19.\n"))
#:exists 'append)

View File

@ -226,6 +226,7 @@
(one-mz-test "embed-me15.rkt" "This is 15.\n" #f)
(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)
;; Try unicode expr and cmdline:
(prepare dest "unicode")