trptcolin / reply

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

Add deps.edn for clj support? #184

Closed seancorfield closed 6 years ago

seancorfield commented 6 years ago

How do you feel about adding deps.edn so REPL-y could be started via clj to connect to a running nREPL session?

(this came up in the #clojure channel on the Clojurians Slack when folks were asking about ways to connect to nREPL servers via clj -- I figured out it could be done via nrepl's nrepl.cmdline/run-repl but that's fairly primitive and a private function)

trptcolin commented 6 years ago

No objections - PR welcome!

seancorfield commented 6 years ago

I'm going to withdraw this because REPL-y also has Java code and clj can't deal with a mixed codebase right now. clj can use REPL-y as a command-line dependency to connect to an existing nREPL session like this, which should be sufficient:

(! 1002)-> clj -Sdeps '{:deps {reply {:mvn/version "RELEASE"}}}' -m reply.main --attach localhost:60606
Exception No namespace: reply.eval-modes.nrepl found  clojure.core/the-ns (core.clj:4128)
CompilerException java.lang.ClassNotFoundException: nrepl.core, compiling:(null:1:82) 
#object[clojure.lang.Namespace 0x71a4f70c "user"]
Error loading namespace; falling back to user
nil
WARNING: cat already refers to: #'clojure.core/cat in namespace: net.cgrand.parsley.fold, being replaced by: #'net.cgrand.parsley.fold/cat
user=> 

(are the errors/exceptions expected? The nREPL server was started via clj in a non-project directory)