[spec] `cat` and `keys*` have different semantics for `:in` path when spec fails

Description

When a spec fails a 'keys*' spec, the 'in' path refers to the path after conforming. This is different from other specs (including 'cat' specs), where the 'in' path indicates the path in the original (pre-conformed) data.

This is confusing for users looking at the default error message, since their original data doesn't have a ':y' key in the example. Furthermore, this makes it difficult for third-party libs to display the bad value in context.

Environment

org.clojure/spec.alpha {:mvn/version "0.2.176"}

Activity

Show:

Details

Assignee

Reporter

Approval

Triaged

Priority

Affects versions

Created September 26, 2018 at 3:45 AM
Updated October 4, 2018 at 7:38 PM