This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-10
Channels
- # announcements (14)
- # beginners (55)
- # calva (4)
- # cider (9)
- # clojure (56)
- # clojure-austin (25)
- # clojure-brasil (1)
- # clojure-dev (29)
- # clojure-europe (44)
- # clojure-mexico (1)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-uk (5)
- # clojurescript (15)
- # cursive (9)
- # datomic (5)
- # emacs (30)
- # events (1)
- # graalvm (30)
- # honeysql (17)
- # hyperfiddle (54)
- # introduce-yourself (1)
- # jobs-discuss (6)
- # kaocha (2)
- # leiningen (5)
- # lsp (6)
- # malli (3)
- # missionary (16)
- # off-topic (42)
- # overtone (40)
- # pedestal (2)
- # re-frame (21)
- # shadow-cljs (16)
- # squint (2)
- # tools-deps (14)
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...
https://gitforwindows.org/ has been my go to in the past.
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
https://github.com/uutils/coreutils (I haven't used this but may provide the DX you want without WSL)
For testing Windows stuff I stick to cmd.exe as much as possible. I don't use Windows as a primary development station though
@UFTRLDZEW can WSL run in a VM?
That would be pretty hilarious. UTM on Mac running Win11 running Linux.
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
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 🙂
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.
what's scoop?
Because I’m using bb scripts I can work from cmd or powershell, I just need a shell with vs vars setup appropriately.
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
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)
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.
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.
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.
If it works out you can copy the pattern to write your workflows in bb 🙂
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.
3 lines of yaml 🙂
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
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. :)
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...
One thing I was wondering. Does anyone use docker containers to build windows native-image binaries?
That seems like it would be the best way to make this setup repeatable...