shadow-cljs

2025-04-20T05:29:05.115009Z

I've got a few shadow-cljs projects I'm working on simultaneously and I noticed when running commands like shadow-cljs watch app I get a few warnings about unavailable 9630 ports. I vaguely remember there was a way to run a single shadow-cljs build server and another command to run per-project to leverage it? Its been 4 - 5 years since I used that last so I am struggling to remember the specifics. Any idea what that was?

thheller 2025-04-20T07:39:27.371149Z

no that has never existed. you can run multiple builds in parrallel if they are on the same project, but not from multiple projects.

thheller 2025-04-20T07:40:05.448029Z

each project always has their own server and the 9630 port auto increments to use the next available port. I frequently have like 3 instances running on my machine without issue

thheller 2025-04-20T07:40:25.828739Z

the port is not usually something you'd need to be concerned about

thheller 2025-04-20T07:41:55.030369Z

the project itself can benefit from server mode, so if you launch a server (e.g. shadow-cljs watch app) then running additional commands in that project will use that server instead of launching a new JVM

2025-04-20T07:53:13.951339Z

Hah that explains why I couldn't find anything about it! Went through the docs again, it was the shadow-cljs server command, and you're right, it was multiple builds I was confusing the memory with

thheller 2025-04-20T07:58:50.580719Z

yeah problem with multiple projects using the same JVM is managing the classpath, all the relative directories, npm dependencies and so on

thheller 2025-04-20T07:58:58.611349Z

not something I ever felt like getting into 😛

2025-04-20T08:00:26.011359Z

I get that, it'd be a lot of probably hacky code