Hi again, I'm really loving expound. My current issue is that, while it's printing the function arguments beautifully, it doesn't tell me what function the call came from. I just get:
Execution error - invalid arguments to orchestra.spec.test/spec-checking-fn$conform! at (test.cljc:115).
type.clj:175
-- Spec failed --------------------
Function arguments
...
I do get <file>.clj:<line>
but I have multiple files named "type.clj" in my project.
I agree, this is confusing! Unfortunately, this is an issue with spec :(. I’ve created a JIRA but it’s not fixed (actually, to be more precise, it’s solved in some cases but not others, and I want to present a consistent UI)
Ah, so spec itself doesn't give you the full path to the function call??
Correct. I think spec now includes the name of the function, which would be nice to include (although it is shown above, just in a non-ideal location), but it doesn’t yet do the same thing for macros, which makes it hard to present something consistent
In my example above, it's not actually printing the spec'd function, but rather the caller of the function (I think).
I think in this case it’s easiest to grep for ‘conform!’ and see which file contains that call on line 115 but I agree it’s not ideal
I'm using this: https://gist.github.com/kennyjwilli/8bf30478b8a2762d2d09baabc17e2f10
Hm, I would expect a call to ‘conform’ on line 115. If that’s not the case, I think that’s a bug, although I suspect a bug somewhere else besides expound ( it’s not involved in printing the “execution error” line)
Yeah I have no idea what "test.cljc" it's talking about, definitely not my code.
That appears to be a function in orchestra. the line numbers have changed (since github is showing a different version than what’s on your machine), but likely something like https://github.com/jeaye/orchestra/blob/4e7fd20ab6596528560c730d1425a77edc1ea2e9/src/clj/orchestra/spec/test.cljc#L124-L131
If it were me, I’d look at disabling orchestra for now, see if the problem reproduces
Ah, good find!
So maybe try disabling orchestra and using normal instrumentation until you find the part of your code that is causing issues. I think that’s a minor change to wherever you call instrument
hope that helps!
Yep, that's the ticket. Thank you for your help!