Affects Version/s: Release 1.9
Fix Version/s: None
If you instrument a function, you may get a spec error like the following:
As you can see,
- the explain-data has a regex (ie. the spec for the args of f) in it as ::s/spec
- each problem contains :args in their :path
These facts can cause a confusion to spec error reporters because the spec for the args of f ((s/and integer? even?)) has no subspec corresponding to the key :args (I believe :path should only contains keys that is a clue to indicate which subspec to be chosen from a spec).
To resolve this confusing situation and improve the consistency of explain-data for instrument check, I think there are two options as follows:
- Solution 1. removing :args from :path
- Solution 2. modifying explain-data for instrument check so that they have fspec (rather than :args of it) as ::s/spec
Personally, I prefer Solution 2. since adding fspec in explain-data makes it possible to provide richer error information to *explain-out* implementors.
The same goes for macroexpand-check.