Fork me on GitHub
Karol W贸jcik18:12:09

I'm wondering if not used Clojure functions are trimmed from GraalVM native image artifact? I know that for plain Java it works that way, however I'm not sure about Clojure in this case.


It also works that way for Clojure


unless you do dynamic stuff like requiring-resolve at runtime which really can bloat the image

馃憤 1
Karol W贸jcik19:12:23

Thanks for clarification. Now, I understand why some of the libraries that load code dynamically produce large artifacts.


@karol.wojcik yes, you can avoid this by doing the dynamic require at compile time, i.e. top level, but "inline" it's going to bloat stuff. I've made specifically to address that issue (based on dynaload from spec)

Karol W贸jcik20:12:34

Whoa. I was aware of the existence of this library, but never understood it's purpose. Now it's clear to me why it matters.