Fork me on GitHub
#graalvm
<
2024-01-10
>
Ingy döt Net14:01:17

I'm getting a windows 11 vm set up to build stuff. What environment should I be using for my builds. Optimally I would like a Bash + GNU make + curl, CLI environment in Windows...

respatialized14:01:58

WSL is very good, particularly if you want coreutils-like affordances, but may not necessarily meet your definition of "in Windows" as it really is a separate OS

borkdude14:01:03

I'm using bb to make it all cross-platform

respatialized14:01:43

https://github.com/uutils/coreutils (I haven't used this but may provide the DX you want without WSL)

borkdude14:01:44

For testing Windows stuff I stick to cmd.exe as much as possible. I don't use Windows as a primary development station though

Ingy döt Net14:01:20

@UFTRLDZEW can WSL run in a VM?

Ingy döt Net14:01:54

That would be pretty hilarious. UTM on Mac running Win11 running Linux.

respatialized14:01:59

I have no idea, tbh, but I think for your purposes @U04V15CAJ’s suggestion of staying closer to the platform defaults might be a better option than worrying about maintaining a complex build/setup process for your VM

Ingy döt Net14:01:45

I think using cmd would be a big set back for my build system. I'll try out windowsforlinux with my current system and see what happens. At worst, I'll fail fast 🙂

lread14:01:55

I only use windows vms to troubleshoot windows issues. I mostly use scoop to install whatever I need and stick to babashka for scripting so that I only have to write my scripts once for all OSes.

lread14:01:00

Because I’m using bb scripts I can work from cmd or powershell, I just need a shell with vs vars setup appropriately.

lread14:01:28

I typically launch clojure via bb’s clojure launcher, but if I want to run a clojure exe I use https://github.com/casselc/clj-msi to avoid cmd line issues with https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows

Ingy döt Net15:01:07

Switching to bb is not what I need at the moment. git for windows provides git, bash and a decent terminal. My build system fetches a graalvm download which contains all the java parts. I'm hoping that running native-image in the right environment will just work (make the correct builds)

lread15:01:26

Not sure if you are also wondering what folks use for CI. I typically use GitHub Actions with https://github.com/DeLaGuardo/setup-clojure and https://github.com/graalvm/setup-graalvm which both work on windows.

Ingy döt Net15:01:34

CI is my next big thing to tackle. I need to make builds for ys and libyamlscript for the 5 graalvm ostype/machtype platforms, publish them to github, and then release a binding module to cpan, pypi, clojars, maven, rubygems and dozens more. My current plan is to also use GHA, but to wire up custom builders instead of using github's. Graal builds are expensive and I'm not even sure GH supports all 5 platforms I need.

Ingy döt Net15:01:23

One thing I'm keen to see is if I can use YS instead of YAML for GHA workflows. I think I can. I've done something like this in the past.

Ingy döt Net15:01:51

If it works out you can copy the pattern to write your workflows in bb 🙂

lread15:01:45

I’m finding that I like to keep most work in my bb scripts instead of workflows. This allows me to run work locally in dev and when troubleshooting.

Ingy döt Net15:01:15

Same. Except bash.

👍 1
Ingy döt Net15:01:32

3 lines of yaml 🙂

Ingy döt Net15:01:26

when ys is far along enough to write bb in, I'll look more into using bb for some things. cross platform scripting is nice. but since I know bash enough to write a book about it, cross-platform stuff isn't a big concern of mine. getting my clojure/bb skills close to my bash skills at this time would be too painful

lread15:01:43

Hey, whatever works! I looooove bb but if bash is your jam, that’s fine!

Ingy döt Net15:01:31

In 2002 my guru told me to learn bash if I wanted to get to thenextlevel. I skipped his advice until 2012 when I decided to write a major framework with plugin system etc in Bash. I wasn't sure if I could but it worked great. And my day to day programming went to thenextlevel. I have nothing but respect for bb but your fluency in bb is limited by your fluency in clojure. I'm not there yet. Also the world needs its bash helper folk, and I'm happy to serve in that role. :)

👍 1
Ingy döt Net14:01:05

The windows build adventure is going pretty well. Just Makefile tweaks. File paths are a bit weird between bash and make. /c/ in bash is C:/ in make for instance. But easy to adjust. Got clojure building the jars now. native-image is looking for visual studio thing which I'm installing now. This all might be way easier than I thought...

Ingy döt Net14:01:50

One thing I was wondering. Does anyone use docker containers to build windows native-image binaries?

Ingy döt Net14:01:41

That seems like it would be the best way to make this setup repeatable...

lread17:01:13

I’ve got no experience with windows docker containers