tools-build

Sam Adams 2024-08-23T22:22:46.605489Z

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 generated

Sam Adams 2024-08-23T23:03:42.719319Z

Ah, never mind (turns out we are explicitly doing code gen as part of namespace initialization)

2024-08-23T23:23:20.689549Z

-verbose is a jvm level flag, the output from it doesn't tell you anything about clojure

2024-08-23T23:24:05.432599Z

When you see "compiling" at the jvm level that usually means the jit compiler generating machine code from class file byte code