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.
2020-01-24T06:04:35.006800Z

@ales.najmann regarding the naming of some of the executable bits for clj / clojure on scoop. at the moment it looks like executable names start with cmd-. i have some tooling that invokes clj -- this works fine on unix-ish systems, and i'm trying to add support for windows. was hoping that it would be doable to have the tool invoke clj.&lt;something&gt; where <something> is from the PATHEXT env var. does it seem doable for scoop-based clojure to provide something along those lines? e.g. have clj.cmd? may be cmd- is necessary to somehow not conflict with something (like within powershell)?

seancorfield 2020-01-24T06:12:27.007600Z

@sogaiu My understanding was the cmd- versions were the shims that allowed the regular clj/`clojure` to work from cmd.exe

seancorfield 2020-01-24T06:13:26.008700Z

Seems like a simple transform, on Windows to prefix the command with cmd- and then it should "just work" (modulo the usual quoting problems/differences -- which deps.clj seems to avoid...)

2020-01-24T06:29:35.017300Z

ah -- thanks for the info. the naming is making more sense to me now 🙂 the tooling is meant to be used generically so i'd like to use "official" names if possible. i appreciate the fine work of the scoop bits, but the cmd- shims won't necessarily be available for folks who don't use scoop. may be i should consider using powershell -command clj ...

seancorfield 2020-01-24T06:48:52.018900Z

I hope that Scoop will become the standard for Windows (for Clojure). It's really just a matter of getting the manifest site switched from litteli's repo to somewhere on http://clojure.org itself and that's been discussed... but there are lots of things on Cognitect's plate.

2020-01-24T07:06:23.020200Z

scoop (and its related clojure bits) has definitely been working well for me so far :thumbsup:

littleli 2020-01-24T07:50:21.024200Z

Initially there were shims for clj and clojure main commands. But it turned out they are not needed if one use powershell. Additionally there was weird issue around escape quoting on some occasion so I removed those shims by default. There was other case though, I remember there was someone who wanted to use emacs under windows, which was using cmd.exe shell by default to lauch things and I solved it by putting shims back, but this time with prefix cmd- that basically covers all the cases that people hit in practice. It is a bit confusing but exactly with line what was already written by you guys 🙂

littleli 2020-01-24T08:21:13.024300Z

issue related to shims: https://github.com/littleli/scoop-clojure/issues/5

2020-01-24T11:30:29.024600Z

appreciate the explanation and link. ty! i'll try invoking clj via powershell to see what happens via clojure.java.shell.

2020-01-24T11:55:49.024800Z

the powershell -command clj ... route seems to work fine for my case, so i think i'll do that for the moment. thanks again!