Fork me on GitHub
#polylith
<
2022-12-19
>
xceno16:12:18

Hi guys! I'm just starting out with polylith and following the tutorial. I'm currently stuck on windows and I assume this might have something to do with it: poly info throws a couple 205 and 206 warnings for the user component I just generated like:

Warning 205: Non top namespace D:\work\my-project\components\user\src\com\example\user\core.clj was found in user.
poly ws get:compoments:user shows this:
{:non-top-ns
  "D:\\work\\my-project\\components\\user\\src\\com\\example\\user\\core.clj",
  :file
  "components/user/src/D:\\work\\my-project\\metascope-cloud\\components\\user\\src\\com\\example\\user\\core.clj"}
which looks an aweful lot like a windows path issue to me. Is this a known issue, or did I miss something? I searched for the issue here in slack, but didn't find anything useful. I'm using cursive on idea 2022.3 . My root deps.ednlooks like this:
{:aliases
 {:dev  {:extra-paths ["development/src"
                       "components/user/src"
                       "components/user/resources"]
         :extra-deps  {org.clojure/clojure {:mvn/version "1.11.1"}}}

  :test {:extra-paths ["components/user/test"]}

  :poly {:main-opts  ["-m" "polylith.clj.core.poly-cli.core"]
         :extra-deps {polyfy/polylith
                      {:git/url   ""
                       :sha       "6bb6140688d9dcd2935543f288b75c680cea19ff"
                       :deps/root "projects/poly"}}}}}

xceno17:12:30

I just checked out the project on linux. No warnings here whatsoever. Everything works fine

seancorfield17:12:59

My recommendation -- for everyone trying to do Clojure work on Windows -- is to use WSL2 and run all the Clojure stuff there.

seancorfield17:12:53

Both my machines are Windows, and both have WSL2 with Ubuntu where I run all the Clojure processes, and then I use VS Code with the remote-wsl extension on Windows and it makes it all seamless.

seancorfield17:12:20

Also, VS Code doesn't have the restriction on :local/root deps that Cursive has.

xceno17:12:47

Fair enough! I only use windows for some tasks and never bothered to setup WSL. But since the poly tool has explicit instructions for windows, I think I'll try to debug it later anyway. Maybe I'm able to find the cause of my issues I agree about WSL though, it'd make my life way easier

seancorfield17:12:54

A lot of Clojure tooling is very hard to use on Windows (cmd, PS) because of quoting issues -- and a lot of projects don't have the bandwidth to try to repro/fix it and don't have any maintainers who use Windows so it's hard work.

seancorfield18:12:42

The last State of Clojure survey suggested that only 10% of Clojurians use Windows and half of those use WSL2... but that does mean 5% of Clojurians are "stuck" in this situation...

xceno18:12:19

> A lot of Clojure tooling is very hard to use on Windows Oh yes, I noticed. I helped myself with git bash, scripts, etc. but yeah... not an ideal experience. I'm working with unreal engine on windows and write our backends and tools in clj, so I tried to do it all on one machine, but at this point it seems easier to just use unreal on linux instead. oh well, the joys of development 🙃