Welcome! Please see the About page for a little more info on how this works.

+5 votes
in tools.deps by
The Socket REPL, even more so with the advent of prepl, seems to be the recommended and most reliable way for Clojure Repl-ing.

Yet at the moment the only way to bootstrap one is by using a very long argument to a {{-J}} option. For instance this how a node CLJS repl could be launched.


clojure -J-Dclojure.server.repl="{:port 5555 :accept cljs.server.node/repl :args [{:opts $(cat cljsc_opts.edn)}]}"


There a couple of problem with this, mainly the {{-D}} and {{:args}} vector wrapping. Not to mention the fact that the user might not know that that particular JVM property accepts edn.

All these details seem implementation details the launcher should hide, the goal being making super easy for users to launch a socket REPL for their editor of choice.

The counterargument of that would be the the editor could build the command line, but this of course is brittle: ideally all the editor knows is address and port and from then on it can query info from the REPL directly (with some sort of feature advertising like in unrepl for instance).

The proposal would be to make some socket repl options first class citizens and some "variable". In any case avoiding the whole JVM property thing. The first class can be the aliased.

Which options are first class is not clear to me yet so tooling maintainers/creators need to think about it a bit but it is good to have a ticket out there for discussing.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/TDEPS-48 (reported by arichiardi)
...