Skip to content

Commit 3768e77

Browse files
heraldenmfikes
authored andcommitted
CLJS-2683: Suppress compiler options in watch log
Do not log `opts` passed to ClojureScript compiler when build is started from `cljs.closure/watch`.
1 parent 23b5dde commit 3768e77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@
29852985
(repeat warnings))
29862986
warnings)))
29872987
ana/*verbose* (:verbose opts)]
2988-
(when ana/*verbose*
2988+
(when (and ana/*verbose* (not (::watch-triggered-build? opts)))
29892989
(util/debug-prn "Options passed to ClojureScript compiler:" (pr-str opts)))
29902990
(let [one-file? (and (:main opts)
29912991
(#{:advanced :simple :whitespace} (:optimizations opts)))
@@ -3128,8 +3128,9 @@
31283128
srvc (.newWatchService fs)]
31293129
(letfn [(buildf []
31303130
(try
3131-
(let [start (System/nanoTime)]
3132-
(build source opts compiler-env)
3131+
(let [start (System/nanoTime)
3132+
watch-opts (assoc opts ::watch-triggered-build? true)]
3133+
(build source watch-opts compiler-env)
31333134
(println "... done. Elapsed"
31343135
(/ (unchecked-subtract (System/nanoTime) start) 1e9) "seconds")
31353136
(flush))

0 commit comments

Comments
 (0)