This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-24
Channels
- # announcements (2)
- # beginners (22)
- # cider (10)
- # clojure (47)
- # clojure-italy (2)
- # clojure-spec (2)
- # clojure-uk (1)
- # clojurebridge (5)
- # clojurescript (19)
- # cursive (1)
- # data-science (7)
- # datomic (2)
- # duct (18)
- # emacs (6)
- # figwheel-main (2)
- # java (2)
- # luminus (1)
- # nrepl (20)
- # off-topic (69)
- # om (3)
- # pathom (45)
- # quil (2)
- # re-frame (16)
- # reagent (1)
- # reitit (6)
- # ring (2)
- # shadow-cljs (33)
- # tools-deps (9)
- # vim (6)
- # yada (1)
Anybody here?
I’m chatting over in #rebl with people trying to get https://github.com/RickMoynihan/nrebl.middleware to work.
My understanding is that in nrepl responses, the :value
should always be a string, since it’s the pr-str
ed evaluation result.
The doc backs that up: https://nrepl.org/nrepl/0.6.0/design/overview.html#_responses
> value
The result of printing a result of evaluating a form in the code sent in the corresponding request.
@maxt has been doing some experimentation, and is sometimes seeing nil
values in responses.
nrebl.middleware implements Transport send, which gets the same request twice, but with different keys in the response map. First time it includes :value
, the second time it gets :status #{:done}
without value.
Does that mean that when you’re getting nil
from :value
, that it’s just because there’s no :value
entry at all?
@cfleming most likley. I'll test to wrap it in a check for the existence of the :value key.
Over in #rebl, @lilactown has reported that he does indeed see the values correctly in REBL, using CIDER and nREPL 0.5.x. Could it be that the CIDER middleware is causing the :value
to be an actual value, i.e. a non-`pr-str`ed string?
@maxt In my experience (all with old nREPL), if that :value
is present it is never nil.
Actually, looking at the Cursive code I do (when-let [val (:value item)]
so I’d never know if there were nil
values, but they seem safe to ignore if there ever are any.
@cfleming This patch seems to work well for me in Cursive. https://github.com/RickMoynihan/nrebl.middleware/pull/16 I can also successfully combine it with https://github.com/RickMoynihan/nrebl.middleware/pull/11 to get a nrepl REBL working as a clojure.main rebel. I have not, however, tested it with any other editor.