trptcolin / reply

REPL-y: A fitter, happier, more productive REPL for Clojure.
Eclipse Public License 1.0
337 stars 44 forks source link

What's the entry point of REPLy for nREPL #191

Closed bbatsov closed 5 years ago

bbatsov commented 5 years ago

I want to add some check for whether REPLy is present when starting nREPL via clj, but I'm not certain what exactly is its entry point for the connection and I assumed I could just ask here the wise and all-knowing @trptcolin. :-)

Basically I need something to call instead of https://github.com/nrepl/nREPL/blob/master/src/clojure/nrepl/cmdline.clj#L24, if REPLy is on the classpath.

bbatsov commented 5 years ago

To answer my own question - it seems I'm looking for https://github.com/trptcolin/reply/blob/master/src/clj/reply/eval_modes/nrepl.clj#L200 (or maybe run-repl in the same ns).

trptcolin commented 5 years ago

Not 100% sure on the use case, but you might want https://github.com/trptcolin/reply/blob/b70ee9fdd31a40be73b505f98cf38839d49b43e8/src/clj/reply/main.clj#L72-L79 or -main in that namespace - there's some added some stuff for signal handling (and also has the available options in that file). Leiningen's repl task or Boot's repl task could be other good places to look for inspiration. Boot's definitely covers the basics, probably the best to start with?

bbatsov commented 5 years ago

I was looking at the Lein code, but your hint to check Boot was great! It's so much easier to get the basics now!