clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
seancorfield 2020-07-30T00:41:19.167700Z

@lee GitHub Actions run on Windows?

lread 2020-07-30T02:31:08.169600Z

Ya, their free tier has Windows, macOS and Ubuntu available for use!

seancorfield 2020-07-30T02:45:24.169800Z

TIL. I guess I just assumed GHA was all Linux...

lread 2020-07-30T13:01:22.172300Z

So what I’m suggesting is, from the standpoint of flexibility and usability on Windows, deps.exe seems to be superior to the alpha Clojure PowerShell module.

lread 2020-07-30T13:01:51.172700Z

I realize there are other variables in the equation.

thomash 2020-07-30T13:35:29.184700Z

Hi all - I want to give some feedback as requested on the https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows page. • I have to say I'm quite unhappy with the PowerShell approach. • While PS is an excellent tool in its own right, I'm shocked by the deep dependencies into Microsoft infrastructure like a .NET Core SDK or .NET Framework that are required for the Clojure Tools. For somebody wanting to focus on Clojure development this seems like a big investment. • Maybe there are good reasons to prefer PS for command line tooling, which I'm not aware of. • But it's hard to believe when you see that Leiningen gets away with a simple .bat script, to bootstrap everything else. • What's more, without admin rights on Windows I cannot help but let the PS module go to a network drive. Which means the tools are unusable when that drive is not available. I tried to fight the execution policies without success. • For somebody new to Clojure why not just download the clojure.jar, and invoke it with a Clojure script that does all the bootstrapping for the command line tools?! It would seem this would be more straight forward, less tedious, and more versatile. • The only dependencies would be a JDK (which you need anyway), clojure.jar, and the bootstrapping Clojure script. No alien dependencies, no fighting with PS modules and security concepts. • The PS setup seems like real overkill when all you want to achieve in the end is to call Java with the right command line options, no?!

borkdude 2020-07-30T13:37:04.185200Z

@the Take a look at deps.exe here https://github.com/borkdude/deps.clj. I believe that solves most of your pain points. Also works in cmd.exe. Contributions are welcome, everything is written in Clojure itself.

sveri 2020-07-31T07:56:56.192Z

@ales.najmann I am a bit hesitant to install another installation tool after chocolate and the announcement from microsoft they will create an official one. Despite that, thanks for putting in the work, it's always good to have options 🙂 I might give it a try on my second machine if I need to.

thomash 2020-07-30T13:38:57.185800Z

Thanks, I'll have a look.

thomash 2020-07-30T13:40:26.186Z

Any chance this will make it into the standard?

borkdude 2020-07-30T13:41:22.186200Z

That's up to the core devs to decide. They may take from it what they want, I also offered my support.

👍 1
borkdude 2020-07-30T13:43:10.186500Z

Installing using scoop is probably the easiest: https://github.com/littleli/scoop-clojure Scoop on Windows is like what brew is for macOS.

thomash 2020-07-30T13:47:03.187100Z

Being on a corporate PC I can only use tools that run in user space (as opposed to admin stuff) ...

borkdude 2020-07-30T13:47:22.187300Z

That's not a problem. Just download the binary from Github releases and put it on your path, done.

👍 1
borkdude 2020-07-30T13:47:47.187600Z

It will download the Clojure tools jar on the first invocation

thomash 2020-07-30T14:01:09.187800Z

I went ahead to also download your "babashka" tool ... looks interesting 🙂 .

borkdude 2020-07-30T14:05:55.188Z

:thumbsup: hope you like it. drop by in #babashka if you have any questions.

👍 1
alexmiller 2020-07-30T14:51:38.188300Z

I'm interested in exploring the use of deps.exe as the Windows standard, but have not had the time to think seriously about it

3
sveri 2020-07-30T14:55:09.188700Z

Admittedly, I was pretty happy when you finally released clj for windows, but experienced the same drawbacks @the just listed plus that it was hard to update clj due to certificate issues. I did not want to complain given that windows is not really a priority, but in the end I had to use clj on WSL, although I would prefer the native cmd tool.

littleli 2020-07-30T16:19:03.188900Z

@the Scoop approach should work with custom Windows installations as it only uses user profile locations. It's hard to proof as custom images can be really, well... Custom. But I have a feedback that scoop install path works well.

littleli 2020-07-30T16:19:59.189700Z

@the @sveri I would actually like to have a feedback from you people...

thomash 2020-07-30T16:26:59.190700Z

For deps and babashka I have taken the path of downloading Github releases. I've also looked at Scoop, which looks promising, but don't hold your breath. It might take a while before I try out the Scoop-clojure bucket ...

littleli 2020-07-30T16:32:10.191Z

both babashka and deps are available in scoop too.

lread 2020-07-30T21:00:16.191300Z

hey @ales.najmann thanks so much for creating and maintaining the clojure scoop bucket! I am using it up on my Windows VM to install deps.clj and babashka.

lread 2020-07-30T21:02:57.191500Z

I am also trying scoop out on GitHub Actions on Windows. It works well for Babashka, but I want to treat deps.exe as clojure so its easier for me use the deps.clj install.ps1 script. After that I can simply rename deps.exe to clojure.exe.

lread 2020-07-30T21:06:14.191700Z

I did encounter some odd failures with a scoop install deps.clj on GitHub Actions. At first I figured a deps.clj issue https://github.com/borkdude/deps.clj/issues/20. As I explore more, I become less sure of the cause, but I do have what seem to be reliable work-arounds.