From 6893426d5d42dd77145f5bddf2f2ab3cd55b8296 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 1 Mar 2014 15:07:13 -0800 Subject: [PATCH] working on reload of project requires during render --- project-requires.rkt | 8 ++++++-- render.rkt | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/project-requires.rkt b/project-requires.rkt index 0f080a8..443e7e1 100644 --- a/project-requires.rkt +++ b/project-requires.rkt @@ -8,8 +8,12 @@ ;; list of all eligible requires in project require directory (define (get-project-require-files) - (define extras-directory (build-path (current-directory) world:extras-dir)) + (define extras-directory (build-path (world:current-project-root) world:extras-dir)) (and (directory-exists? extras-directory) ;; #:build? option returns complete paths (instead of just file names) (let ([files (filter project-require-file? (directory-list extras-directory #:build? #t))]) - (and (not (equal? '() files)) files)))) \ No newline at end of file + (and (not (equal? '() files)) files)))) + +(module+ main +(parameterize ([world:current-project-root (string->path "/Users/mb/git/bpt/")]) + (get-project-require-files))) \ No newline at end of file diff --git a/render.rkt b/render.rkt index 0f5a8d3..fc96564 100644 --- a/render.rkt +++ b/render.rkt @@ -32,7 +32,8 @@ (define (store-render-in-mod-dates . rest-paths) (define key (make-mod-dates-key rest-paths)) - (hash-set! mod-dates key (map path->mod-date-value key))) + (report key) + (hash-set! mod-dates key (report (map path->mod-date-value key)))) (module+ test (reset-mod-dates) @@ -136,7 +137,7 @@ (or force-render (not (file-exists? output-path)) - (mod-date-expired? source-path) + (report (mod-date-expired? source-path)) (let ([source-reloaded? (handle-source-rerequire source-path)]) source-reloaded?)))