We're updating the issue view to help you get more done. 

Clojurescript not using custom explain-out when macro invocation fails spec

Description

This is a follow-up to https://dev.clojure.org/jira/browse/CLJS-2913

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ;; start with ;; clj -Srepro -Sdeps '{:deps {org.clojure/test.check {:mvn/version "0.9.0"} org.clojure/clojurescript {:mvn/version "1.10.516"}}}' --main cljs.main --repl (require '[cljs.spec.alpha :as s]) (require '[cljs.spec.test.alpha :as st]) (require '[clojure.core.specs.alpha]) ;; instrumenting a function (s/fdef foobar :args (s/cat :x int?)) (defn foobar [x] x) (st/instrument) ;; set up an example spec printer (set! s/*explain-out* (fn [e-data] (println "SPEC ERROR!"))) ;;This works great, thanks for fixing! Note custom printer is used. (foobar "") ;; Execution error - invalid arguments to cljs.user/foobar at (<cljs repl>:1). ;; SPEC ERROR! ;; Expected: should call custom explain-out e.g. output should include "SPEC ERROR" ;; Actual: Uses default explain-out provided by spec (let "") ;; Execution error - invalid arguments to cljs.analyzer/do-macroexpand-check at (analyzer.cljc:3772). ;; val: "" fails spec: :cljs.core.specs.alpha/bindings at: [:args :bindings] predicate: vector?

Environment

Clojurescript 1.10.516, Clojure 1.10

Status

Assignee

Unassigned

Reporter

Ben Brinckerhoff

Labels

Approval

None

Patch

None

Priority

Major