This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-16
Channels
- # admin-announcements (5)
- # announcements (2)
- # beginners (2)
- # boot (3)
- # cider (54)
- # clojure (196)
- # clojure-berlin (16)
- # clojure-brasil (4)
- # clojure-dev (36)
- # clojure-italy (3)
- # clojure-japan (9)
- # clojure-korea (3)
- # clojure-russia (18)
- # clojure-uk (24)
- # clojurebridge (11)
- # clojurescript (414)
- # code-reviews (1)
- # core-typed (4)
- # datomic (59)
- # editors (30)
- # euroclojure (2)
- # events (1)
- # jobs (2)
- # ldnclj (16)
- # liberator (11)
- # off-topic (59)
- # om (16)
- # onyx (33)
- # reagent (53)
- # thejaloniki (2)
- # yada (1)
I don't have time to look at this atm but someone go make sense of that!
that is weird..
most likely my fault as I was the last one to touch the destructuring code :)
same behavior in 1.6
(correctly) threw an exception in 1.5
I would strongly suspect http://dev.clojure.org/jira/browse/CLJ-1318 in 1.6 as where it changed
correctly throws with either [y] 1 .. or y [1] … not [y] [1]
user> (destructure '[a/x 42])
[a/x 42]
user> (destructure '[a/x 42 [y] [1]])
[x 42 vec__7738 [1] y (clojure.core/nth vec__7738 0 nil)]
that's intentional (in maps) but doesn't make sense here in positional. that code is tricky.
this throws exception
(let [a/x 42, [y] {:val 1}] x)
`
as does if its a set
it looks like this line is quite wrong as, from what I can tell, it will always drop the namespace of a namespaced symbol: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4289
it will only be hit if there is some actual destructuring going on though, that's why it's still working in the simple case (let [a/x 42] x)
i guess nothing keeps track of whether the symbol in question was used in a map destructuring or not
don't know if that'll be easy to fix, that same path is used to make (let [{:keys [foo/bar]} {:foo/bar 1}] bar) work IUC
looks like cljs has same problem too: https://github.com/clojure/clojurescript/commit/95d60acf610b255dbb4079ccf60739c81a611922
http://sprunge.us/jAgS?diff does it, too much of a hack?
http://sprunge.us/ZQFP is my attempt
@alexmiller: added my patch to ticket... should I include a test case demonstrating the regression too?
there are some destructuring tests at test/clojure/test_clojure/special.clj
clojure jira system likely going down for a little bit today to increase memory on process and box, hopefully to stabilize it for a while
this is a stop-gap till we have time to do more significant updates to that infrastructure