This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-30
Channels
- # announcements (15)
- # beginners (99)
- # boot (15)
- # cider (105)
- # cljdoc (2)
- # cljs-dev (17)
- # clojure (132)
- # clojure-conj (1)
- # clojure-dev (5)
- # clojure-italy (19)
- # clojure-losangeles (2)
- # clojure-nl (20)
- # clojure-spec (70)
- # clojure-uk (50)
- # clojurescript (153)
- # core-logic (9)
- # cryogen (4)
- # cursive (6)
- # datomic (40)
- # duct (5)
- # figwheel-main (10)
- # fulcro (245)
- # hoplon (1)
- # jobs (3)
- # leiningen (12)
- # mount (8)
- # nrepl (11)
- # off-topic (1)
- # pathom (16)
- # pedestal (3)
- # planck (17)
- # re-frame (3)
- # reitit (8)
- # shadow-cljs (64)
- # spacemacs (3)
- # specter (20)
- # tools-deps (21)
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 "")]
(-> (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.