Closed jgpc42 closed 7 years ago
TLDR: AOT-compilation of insn now works: bbf6bb1
Deciphering Clojure stack traces sometimes is truly a daunting task, especially when seeing AOT-related ExceptionInInitializerError
errors. :fearful:
Anyway, the larger issue turned out to be that when AOT-compiled, apparently *ns*
is nil
during the load
. The import
s are trying to update the ns-imports
of the current namespace, which is set properly when interpreted, and not when compiled. This seems like it's related to the larger problem:
CLJ-2185.
So I used custom a ns
macro along with a poor mans eval-when-compile
based on the above information.
Currently, Clojure AOT compiling does not work with "dynamic" class imports like the ones used in this library.
The bug is shown here. I guess I'll report it if I get the time, but looking at the amount of open AOT-related bugs, I don't think it will be a high-priority fix.
I'm open to suggestions on how to handle this. The only thing that I can think of currently is to remove the ability to choose the ASM version you want to use.