I'm struggling to recreate a maven usage of modules using clj CLI. https://github.com/oracle/graaljs/blob/master/graal-js/test/maven-demo/pom.xml shows how to use the JVMCI graal compiler for better performance of graaljs: -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.graal.compiler --upgrade-module-path=${compiler.dir}, where compiler.dir gets a bunch of graal dependencies copied in. Simply adding all those as deps doesn't work, since I don't have a good entry to stick in as the --upgrade-module-path arg. Does anyone have suggestions for how I might go about this? Is it something lazier than I'm expecting, like manually downloading some jars and just manually referencing some directory?
I'm not familiar with upgrade-module-path, is that a jvm thing or a graal thing
it's kind of a hack, but there is a jvm way to specify jars via a limited glob pattern, and I think if you add that string to your :paths, it will actually work, ie :paths ["downloaded/*"]
Awesome. Will poke around. But yes — upgrade-module-path is a jigsaw thing: https://openjdk.org/jeps/261
(The goal here is to allow a stock JVM to graalify itself a little, rather than forcing a user to use the bespoke graalvm build)
the Clojure CLI is really classpath focused and has no support for modules currently
I guess the :paths doesn't help you with the upgrade-module-path
That makes sense — just wanted to check. All good. It works to say that the CLI has to do the non-graal fallback and a different incantation is needed to hook up module stuff
Thank you!