I don't have a use-case for this, but I can imagine one quite easily (testing!) The server in ClojureScript seems to be a singleton. Would changes to make each REPL env have a private server be welcome? This would allow for multiple REPLs to be run simultaneously without affecting each other.
It does look like the repl.server is only used by the browser anyway, so I guess you can currently run 1 of each type of REPL env, but not multiple?
ClojureScript socket REPL supports N connections to a REPL env
if the REPLs are isolated I'm not sure I understand the benefit over just starting them separately
but maybe I'm misunderstanding what you want?
I mean the second thing you thought of: multiple isolated repls. The general reason I wouldn't want to isolate them is that: - they may be transparent as part of the api (e.g. It starts a repl under the hood in order to send commands to the browser) but you don't want to stop the developer from starting their own server. - there's an interface overhead to managing multiple jvm connections and defs. E.g. 3 terminals running separate servers which I then need to fiddle with editor configuration to know when to switch between the 3, vs just differentiating in clojure based on which var I'm poking at within a single jvm.
would need to think about - the REPL stuff we currently have is modeled after Clojure and this seems a bit different
For me, it's akin to being able to run clojure.repl/main multiple times because it closes over it's state.