clj-on-windows 2024-08-30

Hi I installed deps-new :as new but I cannot use it in windows. I get this when I try to run from windows git-bash:

$ clojure -Tnew lib :name com.cool/proj
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (REPL:-2).
C:\Users\Paul%20Dumais\.gitlibs\libs\io.github.seancorfield\deps-new\c1e42aa0fa8a381167bca20d
ecd25b12116a5a3a\resources\org\corfield\new\lib\template.edn (The system cannot find the path
 specified)

Full report at:
C:\Users\PAULDU~1\AppData\Local\Temp\clojure-11232317269261326535.edn

I tried scoop clojure and the msi version released above.

Might be because you have a space in your user name so Java can't read the file paths correctly?

It may also be an interaction with git-bash? I think all of this stuff is only tested on Powershell or plain ol' cmd. I do all of my Clojure dev using WSL2 on Windows which is the other approach the official docs recommend (other than the community MSI installer, for PS/cmd).

The benefit of WSL is that it runs real Linux so everything just works because that's what ~90% of Clojurians use (macOS/Linux). Windows usage is split evenly between PS/cmd and WSL.

I'll try PS to see if I still get this error. IT locks us down so I will have to get them to install WSL2 for me.

Kinda surprised a "lockdown-mentality" IT dept would let you use git-bash instead of Microsoft's official bash-via-WSL 🙂

Thanks for your prompt reply. I think I'll table this for now and hold off on using deps-new until I get wsl2 installed. I'll just set up things manually for now. Cheers!

Even if this works under PS/cmd, you're probably going to run into a lot of other Windows-related issues since very few libraries are written/tested with Windows in mind. Windows has always been a problematic dev env for Clojure (until WSL came along -- the Windows VS Code integration with WSL makes it feel like everything is running "natively": Calva can jack-in to a project on WSL and start a REPL there but keep all the nice affordances of VS Code running on Windows).