Fork me on GitHub
#clojure-spec
<
2019-05-31
>
mpdairy19:05:04

so i have an idea for instrumentation with spec. It would be nice if the arguments to a function with a failing fdef were saved somewhere so they could be inspected in the repl, since a lot of times the spec error message is not very useful, and sometimes is so large it nearly crashes emacs.

mpdairy19:05:35

speaking of that, is there a way to truncate the length of spec error messages?

ghadi19:05:30

spec error messages should be really short as of the last changes

ghadi19:05:44

what version clojure + spec are you using?

mpdairy19:05:09

org.clojure/spec.alpha "0.2.176" and clojure 1.10.0

ghadi19:05:16

are you sure you're not mistaking the ex-data for the exception message?

ghadi19:05:33

(that's the latest release)

mpdairy19:05:37

yeah, it's the explain data. it's when it's showing the "actual" datatype, which can be huge

ghadi19:05:10

that's a tooling thing... CIDER should have a toggle for it

ghadi19:05:37

(It used to be that the ex-data was also serialized into the message string, which is admittedly awful, but that is no longer the case)

mpdairy19:05:57

oh yeah i remember those times