expound

Alex Whitt 2019-05-09T14:51:41.013200Z

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

Alex Whitt 2019-05-09T14:53:36.016Z

I do get <file>.clj:<line> but I have multiple files named "type.clj" in my project.

bbrinck 2019-05-09T14:54:11.016600Z

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 Whitt 2019-05-09T14:54:42.017400Z

Ah, so spec itself doesn't give you the full path to the function call??

bbrinck 2019-05-09T14:56:29.020300Z

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 Whitt 2019-05-09T14:58:17.022600Z

In my example above, it's not actually printing the spec'd function, but rather the caller of the function (I think).

bbrinck 2019-05-09T14:58:28.023100Z

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

Alex Whitt 2019-05-09T15:00:03.025100Z

I'm using this: https://gist.github.com/kennyjwilli/8bf30478b8a2762d2d09baabc17e2f10

bbrinck 2019-05-09T15:00:33.025900Z

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 Whitt 2019-05-09T15:02:59.026500Z

Yeah I have no idea what "test.cljc" it's talking about, definitely not my code.

bbrinck 2019-05-09T15:05:22.028400Z

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

bbrinck 2019-05-09T15:07:11.029800Z

If it were me, I’d look at disabling orchestra for now, see if the problem reproduces

Alex Whitt 2019-05-09T15:09:20.030500Z

aha https://github.com/jeaye/orchestra/issues/44

bbrinck 2019-05-09T15:10:00.030800Z

Ah, good find!

bbrinck 2019-05-09T15:10:49.031800Z

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

bbrinck 2019-05-09T15:11:01.032Z

hope that helps!

Alex Whitt 2019-05-09T15:11:34.032300Z

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