This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-17
Channels
- # announcements (3)
- # babashka (3)
- # beginners (53)
- # biff (2)
- # calva (16)
- # cider (1)
- # clj-commons (1)
- # clj-kondo (97)
- # clj-on-windows (137)
- # clojure (49)
- # clojure-europe (63)
- # clojure-gamedev (1)
- # clojure-nl (2)
- # clojure-norway (50)
- # clojure-uk (4)
- # clojurescript (36)
- # core-async (28)
- # datomic (32)
- # emacs (22)
- # events (1)
- # graalvm (8)
- # honeysql (6)
- # jobs (2)
- # lambdaisland (5)
- # malli (6)
- # nbb (31)
- # off-topic (171)
- # pathom (14)
- # rdf (2)
- # reitit (4)
- # releases (2)
- # scittle (19)
- # shadow-cljs (46)
- # sql (6)
- # squint (6)
Hmm, dabbling into native-image, have a project that use buddy and ran into https://github.com/babashka/pod-babashka-buddy, is this https://github.com/babashka/pod-babashka-buddy/blob/main/java/graalvm/feature/BouncyCastleFeature.java more preferred way than using --initialize-at-build-time=list,of,classes
?
I think that approach is mostly about the security thing which didn't work otherwise
did some whack-a-mole compile/add class/compile until I got native-image to pass with an app that does jwt signature checking
but after compile, got (java exception in Throwable->map form)
{
"type": "java.security.NoSuchProviderException",
"message": "no such provider: BC",
"at": [
"sun.security.jca.GetInstance",
"getService",
"GetInstance.java",
83
]
}
so went back to using that BouncyCastleFeature.java compiled with graalvm and that worked
I initially thought that native-image
would have this RuntimeClassInitializationSupport.rerunInitialization
thing available as a flag, instead of needing to compile a class that looks like configuration to me, but didn't found such a flaghmm well, from https://www.graalvm.org/sdk/javadoc/index.html?org/graalvm/nativeimage/hosted/Feature.html > Features allow clients to intercept the native image generation and run custom initialization code at various stages so Feature classes are something that cannot be covered with flags only
Thinking that maybe a minimal setup of making buddy work in native-image could be extracted under https://github.com/clj-easy/graalvm-clojure even