any hints on what may cause this?
ClassCastException: clojure.lang.KeywordLookupSite$1 incompatible with clojure.lang.IFn
clojure.spec.alpha/spec-impl/reify--1987 (alpha.clj:875)
clojure.spec.alpha/conform (alpha.clj:150)
clojure.spec.alpha/conform (alpha.clj:146)
clojure.spec.alpha/macroexpand-check (alpha.clj:685)
clojure.spec.alpha/macroexpand-check (alpha.clj:681)
clojure.lang.Var.invoke (Var.java:385)
cljs.analyzer/do-macroexpand-check (analyzer.cljc:3312)
cljs.analyzer/do-macroexpand-check (analyzer.cljc:3306)
cljs.analyzer/macroexpand-1* (analyzer.cljc:3326)
cljs.analyzer/macroexpand-1* (analyzer.cljc:3314)
cljs.analyzer/macroexpand-1 (analyzer.cljc:3375)
cljs.analyzer/macroexpand-1 (analyzer.cljc:3371)
cljs.analyzer/analyze-seq (analyzer.cljc:3408)
cljs.analyzer/analyze-seq (analyzer.cljc:3388)
never seen this problem before and don't know where to start looking https://github.com/thheller/shadow-cljs/issues/443
@thheller Given that it is ClojureScript, you may also want to check in #cljs-dev channel
thx but I'm quite familiar with the CLJS side of things, this seems to be something on the CLJ side
new to me
but smells classloadery to me
like a fn compiled with IFn from a different classloader
nah
it's leaking an inner class of KLS
"it"
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/KeywordLookupSite.java#L42-L48
something is invoking this object as a function
oh, gotcha
a bad implementation of ILookupSite
or whichever of those interfaces you need to implement :)
I can never remember
this is the second time I've seen this in a couple weeks
either that, or there's something broken in the inline keyword lookup cache
I’ve seen an error like this “bad lookup site” before
same "impossible" situation with the innards of a KLS
discussed it inthis channel to
but that would be really surprising to me
with @ghadi contributing to that discussion before too I think - not sure what I had before and think we never found the answer
but don’t think it had anything to do with cljs and wasn’t using shadow I’m sure
@ghadi I mean it's not really an impossible situation, just impossible provided you're not handling KLS manually I think?
foudn it https://clojurians-log.clojureverse.org/clojure-dev/2019-01-10
you can access that thunk using fault
I wasn’t doing anything weird
a kw site was just failing magically
interesting
wasn’t trying to get down and manually call the callsite thunk or anything
^ that's all I need -- user wasn't doing anything weird
need a repro case
well, obviously you do, hah
could tooling be doing weird things?
just saying “hey, I’ve saw this and tried to discuss similar recently”
seriously thank you for chiming in - I couldn't remember the details
ah, was clara-rules and core.async in my case
so there were threads involved
and that’s all I ever knew
common tooling maybe? CIDER etc?
and we thought - perhaps the record type was being redef’ed so hitting the non-`identical?` branch of the callsite check
but that shouldn't leak
the bytecode the compiler emits should handle that case cleanly
it's very strange
not sure on tooling, it was actually a reported problem I was trying to diagnose. so yeah, not adding enough useful info here sadly.
I was surprised at it being able to leak at all though indeed.
I tried for a while at the repl to manipulate things enough to cause it, with like redefining things etc, had no success