cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dominicm 2020-03-14T06:41:32.008900Z

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.

dominicm 2020-03-14T06:43:21.009Z

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?

dnolen 2020-03-14T18:35:27.009700Z

ClojureScript socket REPL supports N connections to a REPL env

dnolen 2020-03-14T18:35:48.010300Z

if the REPLs are isolated I'm not sure I understand the benefit over just starting them separately

dnolen 2020-03-14T18:36:06.010600Z

but maybe I'm misunderstanding what you want?

dominicm 2020-03-14T18:57:28.016200Z

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.

dnolen 2020-03-14T18:58:53.017100Z

would need to think about - the REPL stuff we currently have is modeled after Clojure and this seems a bit different

dominicm 2020-03-14T22:25:18.018400Z

For me, it's akin to being able to run clojure.repl/main multiple times because it closes over it's state.