Sean, so you always start a repl from the command line and manually input the generated port number in VSCode? I’m just wondering if there’s a way to connect the editor automatically – I actually use Emacs, but I guess the problem is the same.
I always start the REPL from the command-line -- because my REPLs are very long-lived.
Whereas I have to restart VS Code more often 🙂
The REPL I've been using to work on HoneySQL V1 has been running since January 31st!
Oh, okay. Now it makes sense that your setup is able to add libs dynamically etc (saw your talk). Yeah, for that use case I guess the pain of connecting to a repl is minimal 🙂
My main work REPL has been running since March 24th (I just ssh'd into my desktop from my laptop, then used telnet to connect to the work REPL, and ran (dev/up-since)
which is part of my dot-clojure setup (a function in my dev.clj
file).
I have four REPLs running on my desktop I think.
Got it. I deal with micro-services so I have to start multiple repls very often. I don’t want to keep the repls alive because they eat a considerable amount of memory - for example, I just started a nrepl for one micro-service and it’s taking 1,5gb of ram (while I’m doing nothing). To be honest, I’m surprised with this – never had realised that before testing this now
(oh, there’s an integration project that uses deps.edn
and load multiple services libraries and knows how to wire them together so that you’re able to use the test components for integration tests that involves multiple services - that’s the project the resembles a monorepl the most, but still, it’s another beast.)
That's what we do at work: a single REPL with our entire codebase accessible -- 40+ subprojects making up about 14 services.
I talk a bit about our structure here https://corfield.org/blog/2021/02/23/deps-edn-monorepo/ There's also Polylith, which also works around a single dev REPL with the entire codebase available but everything organized in a modular way @andre.peric
:nice: , will have a look at it.