So I wanted to give Drawbridge a go. I added the Drawbridge Ring handler into my web app and tried to connect to it like this:
(require '[nrepl.core :as nrepl]
'[drawbridge.client :as client])
(with-open [conn (nrepl/url-connect "<http://localhost:8000/repl>")]
(-> (nrepl/client conn 1000)
(nrepl/message {:op "eval" :code "(+ 2 3)"})
nrepl/response-values))
But I get this error: ArityException Wrong number of args (0) passed to: client/ring-client-transport/read--2318 clojure.lang.AFn.throwArity (AFn.java:429)
It looks like the read
function in the Drawbridge client expects a single argument (https://github.com/nrepl/drawbridge/blob/941403588c1cde61f8041f4de82ed53bea837590/src/drawbridge/client.clj#L50) but the calling code in nrepl.transport
doesn't supply any https://github.com/nrepl/nrepl/blob/ff70f1e4cac4ee72cdaba1d95f1216640c84e572/src/clojure/nrepl/transport.clj#L41).
I can't see how that'd work, but maybe I'm missing something. I didn't dive too deeply into the code yet.
@flowthing File a ticket for this. I think someone mention this breakage as well, but I didn’t find a time to investigate it and I forgot about it.
The fix should be pretty simple, although I’m puzzled how we broke this in the first place, as I haven’t really touched the code apart from updating the namespaces for nREPL 0.4 compatibility.
OK, will do.
Thanks!
I'm also a bit puzzled, because I blamed both files as far back as they go and as far as I could see, that discrepancy has always existed.
Might be I just missed something, though.
:thumbsup: