Hello, I'm having a bit of trouble generating a native image. I have pinpointed the problem to the function resolve
. Assuming that the problem was with this function, I tried to rebuild resolve. Eventually, I found the minimal working code:
(defn -main [& args]
((fn [^clojure.lang.Namespace ns] (.getName ns)) *ns*))
which compiles, and
(defn -main [& args]
((fn [^clojure.lang.Namespace ns] (.getMappings ns)) *ns*))
which does not.
As a quick look at the java code for clojure.lang.Namespace shows, both methods do simple field access, and I am unsure as to why one would compile successfully and the other would fail (Unless maybe AtomicReference is causing issues?). Any suggestions you might have would be wonderful.
Edit:
As a quick note, when ignoring unsupported features with --report-unsupported-features-at-runtime
, everything works as intended, even when using clojure.core/resolve
.