tools-build

Jacob Rosenzweig 2023-09-17T18:44:54.791779Z

Is there anyway around these super slow build times for uberjars? I ran clojure -T:build ci on a fresh project and it's taking close to ~3 min to produce a jar.

Jacob Rosenzweig 2023-09-17T18:47:12.072299Z

For another project with ~15 dependencies, it takes more like 5 minutes. I think most of the build time is spent on IO of deps, so adding code won't increase the build time by much but it's still kind of a long time to wait for a jar.

seancorfield 2023-09-17T19:09:44.364349Z

What is your disk setup for your working env? I build much more complex uberjars and they run a lot faster than that.

Jacob Rosenzweig 2023-09-17T19:10:14.261789Z

Like physical disk? It's an SSD. I'm also running in WSl2.

seancorfield 2023-09-17T19:10:26.897689Z

Where are your projects? Windows or WSL2?

Jacob Rosenzweig 2023-09-17T19:10:45.018819Z

Yeah they're on WSL2 running on an ubuntu workspace.

seancorfield 2023-09-17T19:10:57.684319Z

I'm on Windows and run everything Clojure-related (except VS Code) on WSL2 and all my project files are on WSL2 as well.

seancorfield 2023-09-17T19:11:53.226659Z

If you're seeing those slow times, my first suspicion is you have your projects on Windows and you're running clojure on WSL2... which would be very, very slow.

Jacob Rosenzweig 2023-09-17T19:12:16.226879Z

hahahahaha right you are, right you are.

Jacob Rosenzweig 2023-09-17T19:12:20.818289Z

That's exactly what's happening.

seancorfield 2023-09-17T19:12:47.663219Z

Move all your projects to WSL2. Never cross the file system boundary (in either direction).

👍 1
seancorfield 2023-09-17T19:13:40.338599Z

VS Code runs a server process on WSL2 which is how it deals with everything and stays fast: the critical extensions all run on the WSL2.