Skip to content

Commit 7d25650

Browse files
author
dnolen
committed
change cljs.analyzer/cache-file to return cljs/aot/core.cljs.cache.edn resource
if available
1 parent 3690348 commit 7d25650

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/clj/cljs/analyzer.clj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,8 +1888,13 @@ argument, which the reader will use in any emitted errors."
18881888
(defn cache-file
18891889
([src] (cache-file src "out"))
18901890
([src output-dir]
1891-
(let [ns-info (parse-ns src)]
1892-
(io/file (str (util/to-target-file output-dir ns-info "cljs") ".cache.edn")))))
1891+
(if-let [core-cache
1892+
(and (util/url? src)
1893+
(.endsWith (.getPath ^URL src) (str "cljs" File/separator "core.cljs"))
1894+
(io/resource "cljs/aot/core.cljs.cache.edn"))]
1895+
core-cache
1896+
(let [ns-info (parse-ns src)]
1897+
(io/file (str (util/to-target-file output-dir ns-info "cljs") ".cache.edn"))))))
18931898

18941899
(defn last-modified [src]
18951900
(cond

0 commit comments

Comments
 (0)