@borkdude Should I create issues for 1.13 Alpha 10 changes in destructuring? New :req! directive and auto-qualification of & keywords inside a :namespace/keys(!) directive.
yes please! with examples if you can!
Thanks! in the 1.10 announcement there is also a change with respect to qualified or unqualified keys right? that may also affect clj-kondo were you also going to write an issue about that? (you mentioned issueS plural)
thanks!
I'm now trying to decide whether I can live with red squigglies in my code if I start using :req! 🙂 I really want to clean up a bunch of our destructurings, now that feature is available.
I'll get this merged tonight
You're a rockstar!
🤘
I don't know whether you analyze non-required :namespace/keys or just required ones :namespace/keys! (and ../syms!) so I don't know how expansive #3037 will be.
@seancorfield :req! cannot be namespaced right?
(not related to your previous reply)
I can't imagine so... but I haven't actually tested that...
user=> (let [{:foo/req! {a :a}} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
:foo/req! - failed: simple-symbol? at: [:bindings :form :map-destructure :map-binding 0 :local-symbol] spec: :clojure.core.specs.alpha/local-nameWas just confirming that... yeah...
both merged
Faster than I could possibly imagine! As soon as see the #C032YH7P0R2 notification, I'll try it out. Thank you!!! gratitude
Just looked at your comment on #3037. I have not tested how clj-kondo handles that, but I commented to note that both keys are required, both in Alpha 10 and earlier, but in Alpha 10, that unqualified key is now auto-qualified. So, two keys are still required, but the unqualified key now represents a different key being required. Does that make sense now?
Yes, I keep messing the meaning of & up in my head when I read it
since it looks like (foo [x & xs]) where xs is varargs, which is often "optional"
In :keys! all keys are required, both before and after &.
In :keys no keys are required, so anything after & is purely for documentation purposes.
yeah makes sense, it was just a brain fart when I read your comment