IPersistentMap closes = PersistentHashMap.EMPTY
//use array map to preserve ctor order
ret.closes = new PersistentArrayMap(closesvec);
what version of clojure?
--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
Nope, always Java 1.7.0_147-icedtea, and we've been seeing it on Clojure 1.4
> Misc debugging ideas:
>
> You could wrap a try-catch around the error point to trap the ClassCast and dump the System/identityHashCode of every parent ClassLoader.
Interesting. I'm not sure how I'd use that information.
> You could also hack the compiler or the DynamicClassLoader to dump the bytes of this class when it's generated so you could go back and disassemble it. Attached is an old diff (prob Clojure 1.2) that I wrote to do this.
Ah, now this I can understand. We disassembled the .class files on
disk, but they looked ok. If we also always dumped the dynamically
loaded classes somewhere, we might be able to spot the problem in the
bytecode when it occurs. Thanks for the tip!
--Chouser
(defn foo []
(let [a 1, b 2]
((fn bar []
[a b]))))
I think the only sure way to avoid this problem is to never update .class files in the classpath of a running JVM.