change name to `cache-watchlist`

pull/169/head
Matthew Butterick 6 years ago
parent 1cb16c0440
commit 485dc2c062

@ -26,7 +26,7 @@
;; is either list of files or (list #f) ;; is either list of files or (list #f)
(append (->list (get-directory-require-files source-path)) (append (->list (get-directory-require-files source-path))
;; user-designated files to track ;; user-designated files to track
(map ->string (setup:compile-cache-watchlist source-path))))) (map ->string (setup:cache-watchlist source-path)))))
(define pollen-env (getenv default-env-name)) (define pollen-env (getenv default-env-name))
(define poly-flag (and (has-inner-poly-ext? source-path) (current-poly-target))) (define poly-flag (and (has-inner-poly-ext? source-path) (current-poly-target)))
(define path+mod-time-pairs (define path+mod-time-pairs

@ -1 +1 @@
1516488850 1516502120

@ -106,16 +106,16 @@ Default separators used in decoding.
@defoverridable[compile-cache-max-size exact-positive-integer?]{Maximum size of the compile cache.} @defoverridable[compile-cache-max-size exact-positive-integer?]{Maximum size of the compile cache.}
@defoverridable[compile-cache-watchlist (listof (or/c path? path-string?))]{List of extra files that the compile cache watches during a project-server session. If one of the files on the watchlist changes, the compile cache is invalidated (just as it would be if @racket["pollen.rkt"] changed). @defoverridable[cache-watchlist (listof (or/c path? path-string?))]{List of extra files that the cache (= render cache + compile cache, collectively) watches during a project-server session. If one of the files on the watchlist changes, the cache is invalidated (just as it would be if @racket["pollen.rkt"] changed).
If the compile cache can't find a certain file on the watchlist, it will be ignored. Therefore, to avoid unexpected behavior, the best policy is to pass in complete paths (or path strings). An easy way to convert a module name into a complete path is with @racket[resolve-module-path]: If the cache can't find a certain file on the watchlist, it will be ignored. Therefore, to avoid unexpected behavior, the best policy is to pass in complete paths (or path strings). An easy way to convert a module name into a complete path is with @racket[resolve-module-path]:
@fileblock["pollen.rkt" @fileblock["pollen.rkt"
@codeblock{ @codeblock{
(module+ setup (module+ setup
(require syntax/modresolve) (require syntax/modresolve)
(provide (all-defined-out)) (provide (all-defined-out))
(define compile-cache-watchlist (map resolve-module-path '("my-module.rkt")))) (define cache-watchlist (map resolve-module-path '("my-module.rkt"))))
}] }]
} }

@ -46,7 +46,7 @@
(with-handlers ([exn:fail? NAME-FAIL-THUNKED]) (with-handlers ([exn:fail? NAME-FAIL-THUNKED])
(dynamic-require `(submod ,(apply get-path-to-override get-path-args) WORLD-SUBMOD) 'NAME NAME-FAIL-THUNKED))))))])) (dynamic-require `(submod ,(apply get-path-to-override get-path-args) WORLD-SUBMOD) 'NAME NAME-FAIL-THUNKED))))))]))
(define-settable compile-cache-watchlist null) (define-settable cache-watchlist null)
(define-settable preproc-source-ext 'pp) (define-settable preproc-source-ext 'pp)
(define-settable markup-source-ext 'pm) (define-settable markup-source-ext 'pm)

Loading…
Cancel
Save