Fork me on GitHub
#specter
<
2016-11-08
>
levitanong07:11:22

It would suck for renaissance partners, ltd. if they decided to make a clojure library, and found out they couldn’t use the com.rpl namespace 😛

zane16:11:08

Can anyone think of what the root cause for intermittent java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to com.rpl.specter.MutableCell would be?

nathanmarz16:11:40

@zane what version of Specter?

nathanmarz16:11:50

and what's the full stack trace?

zane17:11:00

@nathanmarz: [com.rpl/specter "0.12.0"]

zane17:11:10

I'll get you the stack trace. One moment.

zane17:11:05

@nathanmarz, the Specter part of the stack trace is just:

com.rpl.specter.impl/get-cell                 impl.clj:  469
java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to com.rpl.specter.MutableCell

bfabry18:11:57

we get those all the time as well using specter in a distributed env. I suspect it's got something to do with caching paths

nathanmarz19:11:42

there was a bug in 0.11.2 with that exception related to aot compilation that was fixed in 0.12.0

nathanmarz19:11:56

@zane @bfabry I'll need a reproducible test case

bfabry19:11:30

you won't be getting one from me 😛

zane19:11:39

Yeah, I wish. It's very intermittent. I haven't found a way to reproduce it reliably yet.

bfabry19:11:09

the error happens for us in an environment that's serializing classes and sending them over the wire, deserializing and executing. it's way through the looking glass as far as me actually expecting anyone to support it goes. fortunately by virtue of it being distributed it also retries, and then it starts working. so it's way down on my list of things to care about

nathanmarz19:11:26

The section of the code where it was coming from in the old bug is here: https://github.com/nathanmarz/specter/blob/master/src/clj/com/rpl/specter.cljc#L233

nathanmarz19:11:42

as you can see, it now catches ClassCastException there

nathanmarz19:11:50

only possibility is bound? is returning true for clojure.lang.Var$Unbound

nathanmarz19:11:07

@zane is the context of these exceptions also a distributed env?

zane19:11:43

I might needs some help understanding what you mean by a "distributed env". It's a web server with multiple threads?

nathanmarz19:11:58

ok, that's good to know

nathanmarz19:11:22

by distributed env I mean something like Hadoop where you serialize/deserialize objects

zane19:11:30

Nothing like that.