Fork me on GitHub
Alex Whitt14:05:41

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).

-- Spec failed --------------------

Function arguments

Alex Whitt14:05:36

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)

Alex Whitt14:05:42

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

Alex Whitt14:05:17

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


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)

Alex Whitt15:05:59

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


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!

Alex Whitt15:05:34

Yep, that's the ticket. Thank you for your help!