defn-spec
defn-spec copied to clipboard
`:ret` spec not being instrumented
I followed along with your example in the readme and everything is working as expected except that the :ret
spec for my-inc
isn't being instrumented. s/*compile-asserts*
is true
and the :args
spec is instrumenting correctly.
Hi @thiru. You're correct - that's the expected behavior now. I opted to simplify this library's behavior (and thus maintainability) in https://github.com/Provisdom/defn-spec/pull/9 by removing the validity checking code. It now uses the built-in instrument
checking & throwing behavior. Since Spec does not check :ret
with instrument
, this library does not either. However, we do support Orchestra. If you have that on the classpath, you will get :ret
checking since we prefer orchestra, if available.
I see, yeah that's totally understandable. But maybe it's worth adding a note in the readme? As it is I suppose others may get confused as I did.
Happy to submit a PR with a proposed changed if you'd be open to it?
That'd be great, thanks!
Just added a simple note to the readme: https://github.com/Provisdom/defn-spec/pull/17