Skip to content

Commit 3ecbc3b

Browse files
committed
caching support for transpiled GCL libraries under :none, under higher optimization
just always remit GCL libs un-transpiled
1 parent dbd232a commit 3ecbc3b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,13 +2078,14 @@
20782078
:out-file (.toString out-file)}))]
20792079
(when (and (not js-module?)
20802080
(or (not (.exists out-file))
2081-
;; no caching yet for GCL files that need transpilation
2082-
transpile?
2083-
(and res (util/changed? out-file res))))
2081+
(and res (util/changed? out-file res))
2082+
;; always re-emit GCL libs under optimizations higher than :none
2083+
;; :none will just use the cached transpiled result
2084+
(and transpile? (not= :none optimizations))))
20842085
(when (and res (or ana/*verbose* (:verbose opts)))
20852086
(util/debug-prn "Copying" (str res) "to" (str out-file)))
20862087
(util/mkdirs out-file)
2087-
(if (and (= :none optimizations) transpile?)
2088+
(if (and transpile? (= :none optimizations))
20882089
(spit out-file (transpile opts res js))
20892090
(spit out-file (deps/-source js)))
20902091
(when res

0 commit comments

Comments
 (0)