Skip to content

Commit

Permalink
CLJS-2728: Ability to disable macro spec checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Biserkov authored and swannodette committed Oct 31, 2018
1 parent 20ba8ef commit 6b9a37a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main/clojure/cljs/analyzer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3523,11 +3523,12 @@

(defn- do-macroexpand-check
[form mac-var]
(let [mchk #?(:clj (some-> (find-ns 'clojure.spec.alpha)
(when (not (-> @env/*compiler* :options :spec-skip-macros))
(let [mchk #?(:clj (some-> (find-ns 'clojure.spec.alpha)
(ns-resolve 'macroexpand-check))
:cljs (get-macroexpand-check-var))]
(when (some? mchk)
(mchk mac-var (next form)))))
(mchk mac-var (next form))))))

(defn macroexpand-1*
[env form]
Expand Down
2 changes: 1 addition & 1 deletion src/main/clojure/cljs/closure.clj
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
:fn-invoke-direct :checked-arrays :closure-module-roots :rewrite-polyfills :use-only-custom-externs
:watch :watch-error-fn :watch-fn :install-deps :process-shim :rename-prefix :rename-prefix-namespace
:closure-variable-map-in :closure-property-map-in :closure-variable-map-out :closure-property-map-out
:stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict :fingerprint})
:stable-names :ignore-js-module-exts :opts-cache :aot-cache :elide-strict :fingerprint :spec-skip-macros})

(def string->charset
{"iso-8859-1" StandardCharsets/ISO_8859_1
Expand Down

0 comments on commit 6b9a37a

Please sign in to comment.