diff --git a/pollen/private/command.rkt b/pollen/private/command.rkt index 0c2cd6e..4af4baf 100644 --- a/pollen/private/command.rkt +++ b/pollen/private/command.rkt @@ -75,7 +75,7 @@ version print the version (~a)" (world:current-server-port) world (define (handle-setup directory-maybe) (displayln "preheating cache ...") - ((dynamic-require 'pollen/cache 'preheat-cache) directory-maybe)) + ((dynamic-require 'pollen/private/preheat-cache 'preheat-cache) directory-maybe)) (define (handle-render) diff --git a/pollen/private/preheat-cache.rkt b/pollen/private/preheat-cache.rkt index 26d4712..78570ec 100644 --- a/pollen/private/preheat-cache.rkt +++ b/pollen/private/preheat-cache.rkt @@ -1,8 +1,9 @@ #lang racket/base -(require "../world.rkt" "../file.rkt" racket/file "cache-utils.rkt" "debug.rkt" racket/path racket/place sugar/list) +(require "file-utils.rkt" racket/file "cache-utils.rkt" "debug.rkt" racket/path racket/place sugar/list) +(provide preheat-cache) -(define (preheat-cache [starting-dir (world:current-project-root)]) - (when (or (not (path-string? starting-dir)) (not (directory-exists? starting-dir))) +(define (preheat-cache starting-dir) + (unless (and (path-string? starting-dir) (directory-exists? starting-dir)) (error 'preheat-cache (format "~a is not a directory" starting-dir))) (define max-places 8) ; number of parallel processes to spawn at a time