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 2019-03-30T05:55:48.003900Z

@robert.mather.rmm Blame Windows for that 🙂 You can create clj and clojure .bat files on your path that run powershell clj ... etc which might solve that problem.

miridius 2019-04-05T11:27:17.076600Z

Hey so I've just done this and you have to be slightly careful with it because making a clj.bat which calls powershell clj will create an endless loop 😉 So instead what I've done is made clj.bat and clojure.bat which both contain this line: @powershell Invoke-Clojure %* Works like a charm 🙂

seancorfield 2019-04-05T15:49:18.076900Z

Good to know. I think I had clj.bat call powershell clojure %* just as a test...

ro6 2019-03-30T05:56:37.004900Z

@seancorfield I just punted and moved to WSL for now.

seancorfield 2019-03-30T05:56:39.005Z

PowerShell is a lot more capable than cmd.exe so getting the full functionality of clj/`clojure` is much easier on PS than on cmd.

👍 1
seancorfield 2019-03-30T05:56:57.005500Z

Yeah, I still use WSL for all my pure server-side stuff on Windows.

seancorfield 2019-03-30T05:57:18.006Z

The PS port of clj lets me run REBL and some other tooling more easily tho'.

seancorfield 2019-03-30T05:57:34.006400Z

Can you run shadow-cljs on PowerShell?

ro6 2019-03-30T05:57:40.006700Z

oh, that sounds nice. Haven't tried REBL yet.

seancorfield 2019-03-30T05:57:41.006900Z

(and avoid cmd altogether)

seancorfield 2019-03-30T05:57:51.007200Z

Love REBL. Core part of my daily workflow.

ro6 2019-03-30T05:58:49.007500Z

looks like I can

mseddon 2019-03-30T21:18:12.009100Z

Beware non obvious and hard to research PS escaping rules https://github.com/technomancy/leiningen/issues/2526 but yeah, ps is a vast improvement over cmd

mseddon 2019-03-30T21:20:30.012300Z

Hopefully the answers in that issue saves someone from the hours of noob pain I suffered with ps. clj invocation fortunately just works as you'd expect since it doesn't rely on anything that requires an understanding of the differences between sh and ps. Not sure if that's by luck or design but it is far less error prone.