Just tried compiling a project with graalvm native image, and am seeing errors like:
Error: No instances of <http://javax.net|javax.net>.ssl.SSLContext are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: object java.lang.Object[]
object clojure.lang.PersistentArrayMap
object clojure.lang.Var
object java.lang.Object[]
object clojure.lang.PersistentHashMap$BitmapIndexedNode
object clojure.lang.PersistentHashMap$INode[]
object clojure.lang.PersistentHashMap$ArrayNode
object clojure.lang.PersistentHashMap$INode[]
object clojure.lang.PersistentHashMap$ArrayNode
object clojure.lang.PersistentHashMap
object java.util.concurrent.atomic.AtomicReference
object clojure.lang.Namespace
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
method clojure.lang.Namespace.find(Symbol)
Call path from entry point to clojure.lang.Namespace.find(Symbol):
at clojure.lang.Namespace.find(Namespace.java:188)
at clojure.core$find_ns.invokeStatic(core.clj:4096)
at clojure.core$find_ns.invoke(core.clj:4092)
at clojure.tools.logging.proxy$<http://java.io|java.io>.ByteArrayOutputStream$ff19274a.flush(Unknown Source)
at <http://java.io|java.io>.PrintStream.newLine(PrintStream.java:627)
at <http://java.io|java.io>.PrintStream.println(PrintStream.java:883)
at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:750)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)
I’m currently using: https://github.com/taylorwood/clj.native-cli Wondering what I need to do to make progress…
@rickmoynihan Maybe you need to enable SSL? https://github.com/taylorwood/clojurl/blob/a07858aec1ee920568938260e81bb22096b37802/deps.edn#L10
hmm interesting 👀
I've also found an issue here: https://github.com/oracle/graal/issues/1074 (lmgtfy ;))
yeah also found that clojurl uses org.martinklepsch/clj-http-lite {:mvn/version "0.4.1"}
guessing that works around this issue… need to do more digging
I might be able to switch over to that too
I'm even using that as an interpreted version in babashka: https://github.com/borkdude/clj-http-lite