Skip to content

Commit 052204d

Browse files
committed
only provide cljs.analyzer.api/read-analysis-cache to non-bootstrapped
1 parent 0bf9b1b commit 052204d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/main/clojure/cljs/analyzer/api.cljc

+9-8
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,15 @@
182182
(binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
183183
(ana/analyze-file f opts))))))
184184

185-
(defn read-analysis-cache
186-
"Read an analysis cache."
187-
[cache-file]
188-
(case (util/ext cache-file)
189-
"edn" (edn/read-string (slurp cache-file))
190-
"json" (let [{:keys [reader read]} @ana/transit]
191-
(with-open [is (io/input-stream cache-file)]
192-
(read (reader is :json ana/transit-read-opts))))))
185+
#?(:clj
186+
(defn read-analysis-cache
187+
"Read an analysis cache."
188+
[cache-file]
189+
(case (util/ext cache-file)
190+
"edn" (edn/read-string (slurp cache-file))
191+
"json" (let [{:keys [reader read]} @ana/transit]
192+
(with-open [is (io/input-stream cache-file)]
193+
(read (reader is :json ana/transit-read-opts)))))))
193194

194195
;; =============================================================================
195196
;; Main API

0 commit comments

Comments
 (0)