tools-deps

wcohen 2025-07-10T15:26:20.030269Z

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?

Alex Miller (Clojure team) 2025-07-10T15:58:21.255829Z

I'm not familiar with upgrade-module-path, is that a jvm thing or a graal thing

Alex Miller (Clojure team) 2025-07-10T16:46:53.583419Z

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/*"]

wcohen 2025-07-10T16:56:04.317689Z

Awesome. Will poke around. But yes — upgrade-module-path is a jigsaw thing: https://openjdk.org/jeps/261

wcohen 2025-07-10T16:57:00.063279Z

(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)

Alex Miller (Clojure team) 2025-07-10T17:03:35.300789Z

the Clojure CLI is really classpath focused and has no support for modules currently

Alex Miller (Clojure team) 2025-07-10T17:04:14.088559Z

I guess the :paths doesn't help you with the upgrade-module-path

wcohen 2025-07-10T17:05:01.121599Z

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

wcohen 2025-07-10T17:05:04.655929Z

Thank you!