Closed samharad closed 1 year ago
@samharad Hi Sam, thanks for tracking this down and for the clear report. This is definitely a bug. I'm really sorry about the trouble! This must have been a lot of work to identify.
Will investigate today and get back to you ASAP.
Just pushed [com.taoensso/truss "1.8.0"]
to Clojars, which should fix the issue you're seeing here.
Note that there's one remaining + unavoidable gotcha when using Truss as part of a macro expansion- the assertion's line number will unfortunately be lost by default.
This is due to CLJ-865, dating back to 2013.
While I was fixing the bug you reported, I took the opportunity to document the CLJ-865 issue in the have
docstring, and to provide a manual workaround that you might like to use.
Hope that helps. And again, apologies for the trouble! Cheers
@ptaoussanis Thanks a bunch for the quick patch!
Version: 1.7.2
I'm not sure why the issue presents only in the context of a macro... this led to a tough bug to track down.
I think ideally such in-line assertions on side-effecting forms would be safe; otherwise, perhaps the README should call this out?