[spec] Add support for a non-short-circuiting variant of clojure.spec.alpha/and

Description

Consider this example:

I'd like a way to get the first invocation of explain-data to include the missing ::c and the failing < predicate. I understand that spec/and is designed to short circuit, so perhaps this could be solved with a new function that processes n specs independently.

Environment

None

Activity

Show:
David Chelimsky
February 1, 2018, 9:26 PM

I'll file a separate issue for that.

David Chelimsky
February 1, 2018, 9:26 PM

Actually, I think I just discovered a bug related to this. Following on the examples above:

This should pass (< (:user/a %) (:user/b %))

Alex Miller
February 1, 2018, 3:37 PM

Re the conformer - no, it's by design that conformed values don't flow in s/merge (and is in line with the notion of "not flowing" that goes with "satisfies all"). Re leaving it open, that's up to you. We have talked about creating a non-flowing and variant but I don't think there's a ticket for it.

David Chelimsky
February 1, 2018, 3:23 PM

So I've got this close to working with a custom generator. Do you want to leave this issue open?

David Chelimsky
February 1, 2018, 3:07 PM

Got it. The other part of my specific problem, not reflected in this example, is that I've got a conformer in the middle that the last predicate relies on. s/merge won't work in that case because the conformer can't generate. Would you like a separate issue for that?

Assignee

Unassigned

Reporter

David Chelimsky

Labels

Approval

None

Patch

None

Affects versions

Priority

Major