Skip to content

Commit 542d3fa

Browse files
author
dnolen
committed
brepl shouldn't overwrite compiler opts file
1 parent 55e7c93 commit 542d3fa

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
171171
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace
172172
:closure-variable-map-in :closure-property-map-in :closure-variable-map-out :closure-property-map-out
173-
:stable-names :ignore-js-module-exts})
173+
:stable-names :ignore-js-module-exts :opts-cache})
174174

175175
(def string->charset
176176
{"iso-8859-1" StandardCharsets/ISO_8859_1
@@ -2229,6 +2229,9 @@
22292229
(nil? (:closure-module-roots opts))
22302230
(assoc :closure-module-roots [])
22312231

2232+
(nil? (:opts-cache opts))
2233+
(assoc :opts-cache "cljsc_opts.edn")
2234+
22322235
(contains? opts :modules)
22332236
(ensure-module-opts)
22342237

@@ -2774,7 +2777,7 @@
27742777
(map (comp :externs second)
27752778
(get @compiler-env ::ana/namespaces)))
27762779
(str (util/output-directory opts) "/inferred_externs.js")))
2777-
_ (spit (io/file (util/output-directory opts) "cljsc_opts.edn") (pr-str orig-opts))
2780+
_ (spit (io/file (util/output-directory opts) (:opts-cache opts)) (pr-str orig-opts))
27782781
optim (:optimizations opts)
27792782
ret (if (and optim (not= optim :none))
27802783
(do

src/main/clojure/cljs/repl/browser.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@
296296
(when (and output-dir (not (.exists (io/file output-dir "clojure" "browser" "repl" "preload.js"))))
297297
(spit (io/file "out/brepl_deps.js")
298298
(build/build
299-
'[(require '[clojure.browser.repl.preload])] {:optimizations :none})))
299+
'[(require '[clojure.browser.repl.preload])]
300+
{:optimizations :none
301+
:opts-cache "brepl_opts.edn"})))
300302
(repl/err-out
301303
(println "Serving HTTP on" (:host repl-env) "port" (:port repl-env))
302304
(println "Listening for browser REPL connect ..."))

0 commit comments

Comments
 (0)