Fork me on GitHub

I'd like to do the equivalent of lein repl :connect with clj. That is, something along the lines of clj -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} nrepl/drawbridge {:mvn/version "0.2.0"}}}' -m nrepl.cmdline --interactive --connect --url . I think that's currently not possible, since the --url flag doesn't exist. Would it make sense to add something like that?


...although it's pretty easy to just do something like that yourself. I pieced together a small app that connects to a Drawbridge nREPL endpoint and uses rebel-readline for the REPL stuff.


Tried --host and --port?


Yes, but if the Drawbridge endpoint is e.g. at http://localhost:3001/repl, host and port isn't enough, need to pass the /repl bit as well. And anyway, connecting to a Drawbridge endpoint is done via nrepl/url-connect, whereas nrepl.cmdline currently uses nrepl/connect.


Gotcha. Completly missed the /repl part.


The problem is that for connect to know how to handle http, drawbridge has to have been required already. There’s no real need for a separate param. We just need to add some check in the cmd client to require the drawbridge client ns (if present).


That’s a common problem for all third-party transports url-connect should be made aware of them somehow, so it’d work with them.