I’m using tools.build/compile-clj to AOT compile some code. My basis has a dependency on a library of mine which is AOT compiled, the jar of which does NOT contain the clojure source.
However, when I compile with :java-opts [“-verbose”], I seem to see some of my library clojure being compiled rather than loaded from existing class files, e.g.:
[Loaded __var from __JVM_DefineClass__]
I’m confused because:
- I know that my library jar is on the basis classpath
- I know that my jar contains these compiled classes, i.e. /the_jar/my_company/my_namespace/my_var.class
- I’m pretty sure my clojure namespaces are NOT on the classpath, so I don’t even know from where these classes would be generatedAh, never mind (turns out we are explicitly doing code gen as part of namespace initialization)
-verbose is a jvm level flag, the output from it doesn't tell you anything about clojure
When you see "compiling" at the jvm level that usually means the jit compiler generating machine code from class file byte code