clj-on-windows 2021-04-07

Need help on clj with reagent added from figwheel

this works -
clj -X:new clj-new/create :template figwheel-main :name yourname/hello-world

this doesn't work
clj -X:new clj-new/create :template figwheel-main :name yourname/hello-world :args '["+reagent"]'
or
clj -X:new clj-new/create :template figwheel-main :name yourname/hello-world :args '["--reagent"]'

There we go again...

the error i get

Unknown option '+reagent'
    --> Perhaps you intended to use the '--reagent' option?

@salkadam This is related to quoting. Read the previous discussion. I hope this signal gets through to the clojure CLI folks: quoting strings is painful :)

is there a way to work around this

Have you read the previous discussion?

Alex Miller (Clojure team) 2021-04-07T22:03:45.093600Z

I am aware :)

❤️ 1

TL;DR: use WSL2 on Windows instead of Powershell/cmd.exe 🙂

I hope this is not meant to be the new "works on my machine" kind of reply Sean 🙂

I don’t think I’ve seen folks give a clear answer on how to quote a vector of strings to pass arguments to templates for clj-new on Windows, and I can’t help folks with that when they’re using Powershell or cmd.exe 😐 WSL2 is easy to install and the integration in VS Code makes it as if you have everything on Windows — and makes all of these problems go away — so I see “use WSL2” as a valid alternative to struggling to get Clojure installed and working on Windows and then struggling over and over again every time a project’s README tells you to do something that works on macOS/Linux/WSL2 but does not work on PS/cmd and where the project maintainer doesn’t know how to successfully quote arguments to satisfy Windows 😕