[spec] When a generator fails to gen, state which spec/pred failed
Description
Given a generator using such-that that fails to find a value, the error does not give enough information to determine which spec or predicate was at fault:
Another special case of this is when providing a custom generator that produces a valid that doesn't satisfy the spec (Clojure adds this filter internally):
Proposal: Indicate in the error which spec failed to generate and possibly the path in the overall spec if feasible.
(Note: original description moved to comment)
Environment
None
Attachments
1
Activity
Show:
Jakub Holý October 8, 2019 at 2:42 PM
Duplicate of ?
Griffin Smith January 30, 2017 at 12:51 AM
Attached the patch for future reference (`better-such-that-info.patch`).
Given a generator using such-that that fails to find a value, the error does not give enough information to determine which spec or predicate was at fault:
Another special case of this is when providing a custom generator that produces a valid that doesn't satisfy the spec (Clojure adds this filter internally):
Proposal: Indicate in the error which spec failed to generate and possibly the path in the overall spec if feasible.
(Note: original description moved to comment)