pretty
pretty copied to clipboard
pretty seems to interfere with spec instrument for compiler errors
this is coming from https://github.com/bhb/expound/issues/81
Whenever a compiler error happens, Clojure returns a compilerException containing both the original compilerException and an ExceptionInfo.
Apparantly pretty tries to print both errors through the spec printer which when combined with expound ends up in a huge print on error. Although the size of the print is partially expound fault, it is not able to control how many times the printer is called on an exception. That part is coming from pretty. That is what this issue is about.
Basically whenever a compilerError is returned with an ex-info it should not trigger two print mechanism.
I'm not quite sure what the correct thing to do is here. Pretty is going to dig through the exceptions to find the deepest and its stack trace. I'm hoping not to put any Clojure 1.9 specific code in place, to keep Pretty compatible backwards.
I know it's been a long time, but I could use a little information on what's happening here. Perhaps write-exception could be modified to suppress or replace exception messages, with some kind of filter or callback function? Please re-open if this issue is still relevant after all this time.