Skip to content

Commit 6b9a37a

Browse files
Jordan Biserkovswannodette
Jordan Biserkov
authored andcommitted
CLJS-2728: Ability to disable macro spec checks
1 parent 20ba8ef commit 6b9a37a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/clojure/cljs/analyzer.cljc

+3-2
Original file line numberDiff line numberDiff line change
@@ -3523,11 +3523,12 @@
35233523

35243524
(defn- do-macroexpand-check
35253525
[form mac-var]
3526-
(let [mchk #?(:clj (some-> (find-ns 'clojure.spec.alpha)
3526+
(when (not (-> @env/*compiler* :options :spec-skip-macros))
3527+
(let [mchk #?(:clj (some-> (find-ns 'clojure.spec.alpha)
35273528
(ns-resolve 'macroexpand-check))
35283529
:cljs (get-macroexpand-check-var))]
35293530
(when (some? mchk)
3530-
(mchk mac-var (next form)))))
3531+
(mchk mac-var (next form))))))
35313532

35323533
(defn macroexpand-1*
35333534
[env form]

src/main/clojure/cljs/closure.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
203203
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace
204204
:closure-variable-map-in :closure-property-map-in :closure-variable-map-out :closure-property-map-out
205-
:stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict :fingerprint})
205+
:stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict :fingerprint :spec-skip-macros})
206206

207207
(def string->charset
208208
{"iso-8859-1" StandardCharsets/ISO_8859_1

0 commit comments

Comments
 (0)