Skip to content

Commit ace7e1f

Browse files
committed
CLJS-2608: Shared AOT cache: Browser REPL compiling when build-affecting opt specified
Consolidate require-compilation? check
1 parent ff573d1 commit ace7e1f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,19 +592,14 @@
592592
(.setLastModified ^File out-file (util/last-modified url))
593593
out-file)))
594594

595-
;; TODO: it would be nice if we could consolidate requires-compilation?
596-
;; logic - David
597595
(defn compile-from-jar
598596
"Compile a file from a jar if necessary. Returns IJavaScript."
599597
[jar-file {:keys [output-file] :as opts}]
600598
(let [out-file (when output-file
601599
(io/file (util/output-directory opts) output-file))
602600
cacheable (ana/cacheable-files jar-file (util/ext jar-file) opts)]
603601
(when (or (nil? out-file)
604-
(not (.exists ^File out-file))
605-
(not= (util/compiled-by-version out-file)
606-
(util/clojurescript-version))
607-
(util/changed? jar-file out-file))
602+
(comp/requires-compilation? jar-file out-file opts))
608603
;; actually compile from JAR
609604
(if-not (:aot-cache opts)
610605
(-compile (jar-file-to-disk jar-file (util/output-directory opts) opts) opts)

0 commit comments

Comments
 (0)