if I’m seeing <can't find spec for unqualified spec identifier>
, I assume that’s because my spec definitions don’t match my namespace structure?
e.g. I’ve got :contract.product/start-date
in signal.accounts.spec.accounts
is there anything I can do to make that work while continuing to namespace my specs somehow in the same namespace (e.g. we have account
and contract
entities, they both have the same nested keys such as name
, id
, which might have different specs)
This can occur when using unqualified specs in a ‘keys’ spec i.e. using ‘req-in’ or ‘opt-un’. The issue isn’t related to the namespace structure, it’s just that expound can’t figure out what spec you mean if the explain data only refers to the unqualified key e.g. :name.
The only real solution is to use ‘req’ instead - its an issue with the lack of information included in the explain data returned by clojure.spec
Hopefully that makes sense. It’s confusing. If you post the explain data, I can provide more specifics. It might be something that could be fixed upstream in spec though :man-shrugging:
It’s also possible this is a bug in Expound, but I’d have to see the explain data to know for sure
ah, thank you very much. That does make some sense! I might get back to you if I’m working on the specific project where I’ve seen this any time soon ☺️