dev-stylish
Matthew Butterick 6 years ago
parent a18ff81abb
commit 9ff3eabb03

@ -48,7 +48,9 @@
(hash-ref ram-cache-record subkey)]
[else
(parameterize ([current-namespace (make-base-namespace)])
(namespace-attach-module (namespace-anchor->namespace cache-module-ns) 'pollen/setup) ; brings in currently instantiated params (unlike namespace-require)
;; brings in currently instantiated params (unlike namespace-require)
(define outer-ns (namespace-anchor->namespace cache-module-ns))
(namespace-attach-module outer-ns 'pollen/setup)
(dynamic-require path subkey))]))))
(define+provide (cached-require path-string subkey)

@ -61,8 +61,9 @@
;; otherwise it gets cached in current namespace.
(parameterize ([current-namespace (make-base-namespace)]
[current-directory (dirname path)])
(namespace-attach-module
(namespace-anchor->namespace cache-utils-module-ns) 'pollen/setup) ; brings in currently instantiated params (unlike namespace-require)
;; brings in currently instantiated params (unlike namespace-require)
(define outer-ns (namespace-anchor->namespace cache-utils-module-ns))
(namespace-attach-module outer-ns 'pollen/setup)
(define doc-missing-thunk (λ () ""))
(define metas-missing-thunk (λ () (hasheq)))
(list doc-key (dynamic-require path doc-key doc-missing-thunk)

@ -177,9 +177,9 @@
;; make fresh namespace for scribble rendering (avoids dep/zo caching)
(parameterize ([current-namespace (make-base-namespace)]
[current-directory (->complete-path source-dir)])
(define ns (namespace-anchor->namespace render-module-ns))
(namespace-attach-module ns 'scribble/core)
(namespace-attach-module ns 'scribble/manual)
(define outer-ns (namespace-anchor->namespace render-module-ns))
(namespace-attach-module outer-ns 'scribble/core)
(namespace-attach-module outer-ns 'scribble/manual)
;; scribble/lp files have their doc export in a 'doc submodule, so check both locations
(match (cond
[(dynamic-require source-path 'doc (λ () #false))]

Loading…
Cancel
Save