jeaye/orchestra

ClojureScript exceptions

Closed this issue · 3 comments

Apologies if this is the wrong place to report this - I would not be surprised if it was, but I know too little about the internals and picked a place to start. Will be happy for any direction you can provide, if orchestra is the wrong place to address this.

I'm using orchestra with expound to instrument functions in my ClojureScript codebase. I noticed that the exceptions thrown from orchestra never have file, line number or column set. Is there some way this could be mitigated? Right now I'm getting information about which fdef I'm violating and why, but I get no information about the caller. I'm guessing maybe there is some macro-magic involved that makes this difficult, but am curious if it could be improved?

What happens when you use Clojure.spec instead of Orchestra for the checking? Does that provide file/line/col?

Excellent question, should've checked... I see the same deficiency with cljs.spec.test.alpha. I also tried to disable expound - still seeing the same behavior. So this is deeper. Thanks for the hint. Suggestions for where to look next?

jeaye commented

Thanks, @danielcompton. :)

I'm glad you're using Orchestra, @cjohansen. Thanks for raising this issue so it can be documented. I think the best place to look next would be the ClojureScript Slack channel, mailing list, and/or issue tracker. As you found, this appears to be an issue with cljs.spec.test.alpha. Once it's fixed upstream, we can pull it into Orchestra.