Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(pinpoint (s/coll-of <predicate>) <input>) fails #5

Open
athos opened this issue Oct 13, 2017 · 0 comments
Open

(pinpoint (s/coll-of <predicate>) <input>) fails #5

athos opened this issue Oct 13, 2017 · 0 comments
Labels

Comments

@athos
Copy link
Owner

athos commented Oct 13, 2017

=> (pinpoint (s/coll-of integer?) [:foo])
[PINPOINTER] Failed to analyze the spec errors, and will fall back to s/explain-printer

In: [0] val: :foo fails predicate: integer?
nil
=> (pinpoint (s/coll-of integer?) [:foo] {:fallback-on-error false})

IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:550)
=> 

This is due to CLJ-2168. A workaround for the issue is to wrap the predicate in s/spec:

=> (pinpoint (s/coll-of (s/spec integer?)) [:foo])
Detected 1 spec error:
----------------------------------------------------------------------
(1/1)

    Input: [:foo]
            ^^^^ 
 Expected: integer?

----------------------------------------------------------------------
nil
=> 
@athos athos added the spec bug label Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant