diff --git a/main.rkt b/main.rkt index cf3e038..5a2fff0 100644 --- a/main.rkt +++ b/main.rkt @@ -3,8 +3,18 @@ (provide (except-out (all-from-out racket/base) #%module-begin) (rename-out [new-module-begin #%module-begin])) +(require pollen/lang/inner-lang-helper) + (define-syntax-rule (new-module-begin body-exprs ...) (#%module-begin + + ; this is here only so that dynamic-rerequire of a pollen module + ; transitively reloads the extras also. + ; if this isn't here, then dynamic-rerequire can't see them + ; and thus they are not tracked for changes. + + (require-project-require-files) + (module inner pollen/lang/doclang-raw ;; doclang_raw is a version of scribble/doclang with the decoder disabled ;; first three lines are positional arguments for doclang-raw diff --git a/render.rkt b/render.rkt index 894b700..bf696ee 100644 --- a/render.rkt +++ b/render.rkt @@ -118,12 +118,17 @@ (render-through-eval `(begin (require pollen/cache)(cached-require ,source-path ',world:main-pollen-export)))))) +(require racket/rerequire) + (define/contract (render-markup-source source-path [maybe-template-path #f]) ((complete-path?) ((or/c #f complete-path?)) . ->* . bytes?) (match-define-values (source-dir _ _) (split-path source-path)) (define template-path (or maybe-template-path (get-template-for source-path))) (render-for-dev-server template-path) ; because template might have its own preprocessor source + (displayln "REREQ!") + (dynamic-rerequire (string->path "/Users/mb/git/bpt/pollen-require/bpt-elements.rkt")) + (define expr-to-eval `(begin (require (for-syntax racket/base)) @@ -200,7 +205,7 @@ pollen/tools pollen/world pollen/project-requires) - (require-project-require-files) + ; (require-project-require-files) (define-namespace-anchor my-module-cache-ns-anchor) (provide my-module-cache-ns-anchor)) @@ -236,5 +241,5 @@ pollen/tools pollen/world pollen/project-requires - ,@(get-project-require-files))) + )) (string->bytes/utf-8 (eval expr-to-eval (current-namespace))))) \ No newline at end of file