If you're using graalvm, https://graalvm.typeform.com/survey and let's represent the Clojure community
Hi all! I'm trying to generate a native image with graalvm for a small PoC that uses cognitect aws api to invoke dynamodb ops...
native-image -jar target/migrator-0.0.1.jar \
--no-fallback \
--features=clj_easy.graal_build_time.InitClojureClasses
But it yields
Classes that should be initialized at run time got initialized during image building:
org.eclipse.jetty.http.HttpCompliance$1 was unintentionally initialized at build time. To see why org.eclipse.jetty.http.HttpCompliance$1 got initialized use --trace-class-initialization=org.eclipse.jetty.http.HttpCompliance$1
org.eclipse.jetty.http.HttpCompliance was unintentionally initialized at build time. To see why org.eclipse.jetty.http.HttpCompliance ...
Tracing the class initialization leads to at cognitect.http_client$create.invokeStatic(http_client.clj:333) but unsure what to do about it. I've tried both pre-creating an http client for the ddb client and adding cognitect.http_client and cognitect.aws.http.cognitect to --initialize-at-run-time but seems to do nothing.
Any insight would be huge. 🙌you could have a look at pod-babashka-aws which native-compiled aws-api. it is now deprecated in favor of awyeah-api which works with babashka, so you don't even have to native-compile anymore
@borkdude Thanks for this - interesting. Any thoughts on if I still need to native compile?
@cody.heaps It depends what you want to do. If your "migrator" app can run in bb + awyeah-api then you could avoid native compilation.