From 1e84b11462d103f5351e7951fd41fd5f2e6ab00e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 22 Jun 2019 07:40:55 -0600 Subject: [PATCH] expander: repair extraction when using an existing Racket build Recent improvements to module-name resolution caching exposed a problem in the extraction setup. --- racket/src/expander/run.rkt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/racket/src/expander/run.rkt b/racket/src/expander/run.rkt index e196914efe..1cbbd35925 100644 --- a/racket/src/expander/run.rkt +++ b/racket/src/expander/run.rkt @@ -6,7 +6,9 @@ [eval host:eval] [namespace-require host:namespace-require] [current-library-collection-paths host:current-library-collection-paths] - [current-library-collection-links host:current-library-collection-links]) + [current-library-collection-links host:current-library-collection-links] + [current-namespace host:current-namespace] + [make-base-namespace host:make-base-namespace]) compiler/depend "common/set.rkt" "main.rkt" @@ -220,7 +222,10 @@ (host:current-library-collection-paths l)) (let ([l (list #f (build-path checkout-directory "share" "links.rktd"))]) - (host:current-library-collection-links l))) + (host:current-library-collection-links l)) + ;; Need to start with a fresh namespace when we adjust the + ;; collection and links paths; otherwise, caching can interfere + (host:current-namespace (host:make-base-namespace))) (current-library-collection-paths (host:current-library-collection-paths)) (current-library-collection-links (host:current-library-collection-links))