Skip to content

Commit e8b0385

Browse files
author
dnolen
committed
tweak, only load analysis caches in compile-file if we're optimizing constants,
this is what we need it for
1 parent 9a276fb commit e8b0385

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/clj/cljs/compiler.clj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@
11131113
ret))
11141114
(do
11151115
;; populate compilation environment with analysis information
1116-
;; while it would seem this isn't necessary avoiding to do so damages
1117-
;; composition of smaller compilation units like expressions (i.e. REPLs)
1118-
(when (not (contains? (::ana/namespaces @env/*compiler*) ns))
1116+
;; when constants are optimized
1117+
(when (and (true? (:optimize-constants opts))
1118+
(not (contains? (::ana/namespaces @env/*compiler*) ns)))
11191119
(with-core-cljs opts (fn [] (ana/analyze-file src-file opts))))
11201120
ns-info)))
11211121
(catch Exception e

0 commit comments

Comments
 (0)