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 <predicate> <input>) fails #2

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

(pinpoint <predicate> <input>) fails #2

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

Comments

@athos
Copy link
Owner

athos commented Oct 13, 2017

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

val: :foo fails predicate: :clojure.spec.alpha/unknown
nil
=> (pinpoint integer? :foo {:fallback-on-error false})

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

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

=> (p/pinpoint (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
@marco-m
Copy link

marco-m commented Jul 11, 2018

Update: CLJ-2068 is solved and available in spec.alpha-0.2.168

@athos
Copy link
Owner Author

athos commented Jul 12, 2018

Hi, thank you (again) for pointing it out!

As with #4, spectrace still needs a little more work to make Pinpointer work with these code. So, stay tuned for a little bit while 🙏

@marco-m
Copy link

marco-m commented Jul 12, 2018

Sure, no problems, and thanks for Pinpointer!

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

2 participants