Skip to content

Commit 7a6ce7f

Browse files
author
dnolen
committed
CLJS-1132: compile-file analysis pass optimization broken under Closure optimization and :cache-analysis true
1 parent da8d16e commit 7a6ce7f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/clj/cljs/closure.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,8 +1370,7 @@ should contain the source for the given namespace name."
13701370
([source opts compiler-env]
13711371
(env/with-compiler-env compiler-env
13721372
(let [compiler-stats (:compiler-stats opts)
1373-
all-opts (assoc (add-implicit-options opts)
1374-
:compilation-mode :non-interactive)
1373+
all-opts (add-implicit-options opts)
13751374
emit-constants (or (and (= (:optimizations opts) :advanced)
13761375
(not (false? (:optimize-constants opts))))
13771376
(:optimize-constants opts))]

src/clj/cljs/compiler.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,8 +1115,7 @@
11151115
;; populate compilation environment with analysis information
11161116
;; while it would seem this isn't necessary avoiding to do so damages
11171117
;; composition of smaller compilation units like expressions (i.e. REPLs)
1118-
(when (and (not= (:compilation-mode opts) :non-interactive)
1119-
(not (contains? (::ana/namespaces @env/*compiler*) ns)))
1118+
(when (not (contains? (::ana/namespaces @env/*compiler*) ns))
11201119
(with-core-cljs opts (fn [] (ana/analyze-file src-file opts))))
11211120
ns-info)))
11221121
(catch Exception e

0 commit comments

Comments
 (0)