This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (3)
- # babashka (35)
- # babashka-sci-dev (42)
- # beginners (27)
- # calva (7)
- # clj-kondo (18)
- # cljs-dev (1)
- # clojure (40)
- # clojure-europe (141)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (40)
- # clojurescript (15)
- # community-development (4)
- # cursive (54)
- # events (1)
- # fulcro (8)
- # helix (5)
- # hyperfiddle (22)
- # introduce-yourself (6)
- # jobs (3)
- # joyride (26)
- # lsp (7)
- # music (1)
- # nbb (7)
- # off-topic (28)
- # pathom (120)
- # pedestal (3)
- # podcasts (2)
- # portal (2)
- # rdf (2)
- # releases (20)
- # rewrite-clj (9)
- # shadow-cljs (26)
- # spacemacs (1)
- # sql (13)
- # vim (10)
- # xtdb (63)
I just (finally) got a Windows GraalVM native-image CI pipeline working on another project. Here's the GitHub Actions workflow: https://github.com/cap10morgan/opawssm/blob/843d64ff02b6e38851b1c7118b867d916f1ac1da/.github/workflows/ci.yml#L31
ah, cool. wasn't sure if you were still looking for that. I saw some old comments you'd left in some places I was looking too. 🙂
The most friction in Windows + clojure CI comes from powershell issues. If you use deps.exe or
bb clojure it's likely easier. @lee can confirm this with a recent build
the scoop clojure
cmd-clojure shims seem to work too (from cmd.exe so you can setup the native-image env)
I wonder if the Clojure core team has thought of adopting deps.clj as its official launcher for Windows?
I was originally planning to use it to install some other things too. but might revisit since I didn't in the end.
On Github Actions + Windows you could just use
setup-graalvm from the official graalvm repo +
bb clojure and have thing compiling in a few minutes
Yeah I’d been using
deps.exe in the past, but since I have bb installed on every CI env I use, I’ll start using that.
FWIW, I don't like launching native-image from tools build (JVM) since I like to give native-image as much memory as I possibly can - this gives faster compile times
From the setup-graalvm action: • sets up Windows environments with build tools using https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
hmm... I'll have to mess around w/ it some more. kept getting the "can't find cl.exe" error
Hmmm… you sure you are not using maybe
DeLaGuardo/setup-graalvm instead of
yep, it can find cl.exe now w/o me installing it. cool, thanks for pointing that out!
I'd have to plug it back in and give it another try. Some dynamic loading stuff IIRC
Oh, dynamic loading... yeah that should probably be avoided altogether, since that blows up the image.
Yeah there's some happening inside the cognitect lib that I found instructions for avoiding. I tried applying those instructions to awyeah but couldn't quite get it to work.
I did open this PR (in case you didn't see it) to fix the couple of reflection warnings you noted in your README. So that's the first thing that helps w/ graalvm. https://github.com/grzm/awyeah-api/pull/1
Cheers. I've seen it, just been busy. Can you elaborate on how fixing the reflection warning helps with graalvm?
graal needs a reflection config JSON file for any runtime reflection you need it to do. so any that you can eliminate instead is much nicer. not sure if there are performance implications too, but keeping that file short to non-existent is nice.
I think the rest of the native-image issues were not directly related to awyeah. I put it back in and everything seemed to build and run correctly. So yay!
Some of the cognitect api suggestions are still in place (e.g. passing an http client instance), but I haven't had a chance to test if they're necessary or not. Can investigate a little further next week.