Fork me on GitHub
#clojure-dev
<
2019-09-20
>
thheller22:09:20

$ clj
Clojure 1.10.1
user=> (let [x :clojure.spec.alpha/invalid] x)
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
:clojure.spec.alpha/invalid - failed: any? at: [:bindings :init-expr] spec: :clojure.core.specs.alpha/bindings
user=>

thheller22:09:51

seems like a bug?

seancorfield22:09:59

A JIRA issue was raised about it three years ago @thheller

hiredman22:09:15

do you happen to have a link to that? I was looking the other day and couldn't find it

seancorfield22:09:06

It came up on the mailing list just a few days ago which is why I remembered it... and why I couldn't find it searching Slack or Zulip! 🙂

thheller22:09:31

ah right. my search failed because the ticket uses :clojure.spec/invalid

Alex Miller (Clojure team)22:09:26

I should prob just close that as won’t fix

Alex Miller (Clojure team)22:09:13

There are workarounds for all the situations I’m aware of like this and it’s I think nontrivial to “fix”

Alex Miller (Clojure team)22:09:56

Like in the example above you can def a var to the invalid keyword and then use the var instead

thheller22:09:41

yeah, I suggested that too

seancorfield22:09:59

Ah, the ticket predates Spec being broken out of Clojure 1.9 into the separate alpha package? (or is it just a typo)