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.
alexmiller 2019-01-25T05:38:47.001300Z

hey all, I created this as a place to talk just about porting clj to windows

alexmiller 2019-01-25T05:44:28.005500Z

so current status… Ticket is at https://dev.clojure.org/jira/browse/TDEPS-67. About a year ago @darnok did an initial port of clj to powershell. I started from there and made many updates, both in the scripts themselves to sync them up to the current state (at the time), and to integrate everything into the current build, flesh out how the build generates the install scripts, and all that jazz. All of that is on in https://github.com/clojure/brew-install on the windows-port branch. I just merged the main 1.10.0 branch in there (although there are some minor script changes from the main clj scripts that probably need to be absorbed). You can build (on a *nix system, which is where we CI) by running script/package.sh.

alexmiller 2019-01-25T05:47:22.007800Z

This should generate a zip file at target/clojure-tools-<version>.zip. That zip contains a win-install.ps1 script, and other files - the executable uber jar file, the scripts, example deps.edn file, install-level deps.edn file, etc.

alexmiller 2019-01-25T05:49:26.009400Z

At this point, I haven’t worked on this in about 8 months, so I don’t recall how well that install works, or how well the scripts work. At this point, I think it would be good to test all of that on Windows and see how badly broken it is.

alexmiller 2019-01-25T05:50:42.010700Z

I assume there are some things to fix. If those are small, you can just tell me what to fix or feed me patches. If that becomes an obstacle, we’ll look at commit rights.

alexmiller 2019-01-25T05:52:15.012200Z

And then I think it’s worth thinking about the best installation path for people. I don’t know if it’s a chocolatey package, or an executable zip, or whatever. I haven’t developed on Windows for 15 years, so I’m not in touch with current best practices. If there are options, let’s make a table on the wiki and evaluate.

alexmiller 2019-01-25T06:10:02.013600Z

Keeping all this stuff in the brew-install repo (I know, name is bad) and part of the main build is advantageous because I can then build and release all the versions at the same time, which seems preferable unless there is some reason it can’t work, so I’d to push that as far as possible.

timgilbert 2019-01-25T22:18:03.015700Z

I'd personally like to get a chocolatey package for installation, though I wouldn't be heartbroken if it's not officially maintained by the core team

timgilbert 2019-01-25T22:19:33.016300Z

@alexmiller by "table on the wiki" do you mean the brew-install wiki? I don't seem to see one there

timgilbert 2019-01-25T22:23:29.018200Z

Also just to clarify, is it correct that (1) the patches currently on TDEPS-67 have already been applied to the windows-port branch, and (2) you'll want patches through the usual CA + patches on a Jira ticket process? (Versus a github pull request, I'm fine either way, just wanted to check)

timgilbert 2019-01-25T22:26:12.020100Z

I'm also just getting my toes back into the Windows waters after a long and blessed absence, but I'll try doing a little research this weekend to see what other open-source language / compiler toolchains do about default install paths

timgilbert 2019-01-25T22:55:14.026500Z

From what I can tell, most OSS languages wind up with .exe or .msi installers, which I imagine will put them in C:\Program Files and then bung the directory into the user's PATH. So far I've checked node, ruby, scala, groovy, go, rust, elixir, python, haskell and jruby, and .exe installers seem like the de facto standard. A few also offer a .zip file and instructions about modifying your PATH. Elixir alone offers a choco install command line in their public docs. A few languages (notably rust) offer ancillary tools as .exe files which then manage the actual interpreter / compiler installation themselves, a la rvm.

alexmiller 2019-01-25T23:31:56.027Z

Yes, those patches are out of date

alexmiller 2019-01-25T23:32:08.027500Z

So no reason to look at them

alexmiller 2019-01-25T23:49:00.029900Z

I’m not opposed to a pr if that is the easiest thing. I probably won’t apply it directly but it’s trivial to get a patch from a pr

alexmiller 2019-01-25T23:50:25.030800Z

I suspect it’s trivial to make and publish one as part of the build so would be happy to do so

👍 2
alexmiller 2019-01-25T23:51:45.031500Z

Yeah, can you see https://github.com/clojure/brew-install/wiki ?

alexmiller 2019-01-25T23:55:59.032600Z

As far as I’m concerned an exe is just rearranging the bits, so not opposed to that once the rest is good