Hi all,
On windows, I keep getting this error: Cannot run program "java" (in directory "C:\home\src\my-project\lab"): CreateProcess error=206, The filename or extension is too long
unless I exclude a lot of packages in :dependencies
Is there anyway to circumvent with with lein? I've googled the error, but I only see java hacks, which I don't quite get (I have little java knowledge)
[Edit: not sure if this is the same error as I'm thinking of...] This is a Windows limitation on command-line length, as I recall. The Clojure CLI gets around this by using a file for the classpath instead of constructing a long command, I think. Not sure that Leiningen has anything similar...
Hmm, is that your real filesystem path?
kind of. I omitted my project name and put my-project . my actual project name is 8 chars long. I also have LongPathsEnabled set to 0x1 in regedit. I guess that doesn't change anything.
And no spaces or special characters in the filesystem path to the project?
No. but one of the 5 relative dirs in :source-paths has a hyphen, -
Filesystem paths should always be _ not - so that might be a factor.
true.. I'll change it and see if the repl can start, but 2 things.. the project works fine on my nix system, and it also works fine on windows once i remove some package dependencies
This is why I do all my dev on WSL2/Ubuntu on my Windows machine (and run VS Code on the Windows side).
Windows shell is just so painful...
😂 yh. I wanted to use wsl, but my only concern is that things would be slower on wsl. I'm using my system to distribute some feature engineering workload and need as much speed as i can get
I run Docker with Elastic Search, MySQL, and Redis all on WSL, and a huge Polylith codebase with multiple apps running in my REPL, on a 32GB Dell desktop 🙂
alright then, I'll give wsl a go
WSL itself is pretty snappy; what can be slow though is file access between WSL and Windows, as they see each other as essentially network drives. Depending on your setup and workflow that could matter.
Yup, that's why I have all my Clojure project files on WSL, and only the VS Code "local" stuff on Windows (settings, etc). I basically treat my machine as an Ubuntu desktop that just happens to run Windows for the UI 🙂
I assumed in your setup most of the file access would be done by the REPL or LSP server, so linux-on-linux, with just a network connection between that linux-side server and the Windows-side IDE.
(except for your own inputs, but in this case "a bit slow" is still fast enough to keep up with human fingers)