Open DerGuteMoritz opened 1 year ago
Update for posterity: it's probably not the same as CLJ-1741, even if it's related. 1741 is a duplicate of of CLJ-1650, but that was fixed in Clojure 1.8, so the timing seems wrong.
Re-opening, because the problem isn't really fixed, we just removed the type hints.
But it's interfering with Eastwood, CircleCI, and automatic deploys.
Update. Now it's flat-out breaking the new HTTP/2 code. What's going on?
Ouch! Do you have a repro case to look at somewhere?
No, I think I was confused. I don't think it's AOT-related now.
I think the issue is loading byte-streams in Netty threads that use their own classloader. It gives me a ClassCastException even when Netty finds the class because class identity is tied to classloader.
It just looked a bit like the AOT errors we've gotten in the past.
Right now I'm biting the bullet and trying to decide how best to insert the clj loader into Netty threads. It's become more of an issue with the way ALPN and http2 multiplexing work; we have to do more work in Netty than we did for http1, and that runs a greater risk of needing the clj loader.
Repro: https://github.com/bevuta/byte-streams-def-conversion-aot-issue
Essentially the same issue as https://github.com/clj-commons/byte-streams/issues/34 but with
tools.deps
andtools.build
instead of Leiningen. The resulting error is the same:It's very likely caused by https://clojure.atlassian.net/browse/CLJ-1741, i.e. when first AOT-compiling a namespace which depends on another namespace which contains a
def-conversion
call, and then AOT-compiling that namespace itself.