This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-07
Channels
- # adventofcode (202)
- # aleph (8)
- # announcements (13)
- # architecture (1)
- # aws (2)
- # beginners (201)
- # boot (1)
- # bristol-clojurians (1)
- # calva (2)
- # cider (23)
- # cljs-dev (22)
- # cljsrn (2)
- # clojure (105)
- # clojure-bangladesh (1)
- # clojure-berlin (8)
- # clojure-dev (104)
- # clojure-europe (3)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (24)
- # clojure-russia (55)
- # clojure-spec (44)
- # clojure-uk (19)
- # clojurescript (58)
- # component (58)
- # cursive (3)
- # data-science (1)
- # datomic (27)
- # duct (6)
- # events (6)
- # figwheel-main (6)
- # fulcro (15)
- # jobs (3)
- # kaocha (5)
- # luminus (1)
- # music (1)
- # nrepl (2)
- # off-topic (24)
- # onyx (1)
- # pedestal (3)
- # protorepl (8)
- # re-frame (18)
- # reagent (39)
- # reitit (1)
- # remote-jobs (1)
- # ring (15)
- # rum (11)
- # shadow-cljs (5)
- # sql (8)
- # tools-deps (12)
- # vim (7)
Hey. I've never managed to get the #break
macro to work for me. Is there anything I might be missing?
I am doing some custom validation inside a macro. I know the file and line/column information of the error- is there a way to raise an exception in such a way that Cider can report the issue at the relevant position in the right buffer?
ah, I see clojure.lang.Compiler$CompilerException, which is working okay, but if there's a better class to use, I will.
Can someone clarify this from the nrepl docs for me:
> :requires, a set containing strings or vars identifying other middleware that must be applied at a higher level than the middleware being described. Var references indicate an implementation detail dependency; string values indicate a dependency on any middleware that handles the specified :op.
Does “higher level” here mean that :requires
happen before the handler call?
ok further down it expands on the above — so looks like :requires
are before
Ok I’ve figured out how to get REBL to spy on an nrepl connection
seems to work — but likely needs some more work… I need to properly test it
Awesome. I'm well up for having a go with something not fully tested :)
well I have a few more hoops to jump through… I’m currently testing it by starting a server in my cider repl with (def nrep (ser/start-server :port 55801 :handler (ser/default-handler #'wrap-nrebl)))
and then sending forms to it via an nrepl client call:
(with-open [conn (nrepl/connect :port 55801)]
(-> (nrepl/client conn 1000) ; message receive timeout required
;(nrepl/message {:op "inspect-nrebl" :code "[1 2 3 4 5 6 7 8 9 10 {:a :stuck_out_tongue: :c :d :e #{5 6 7 8 9 10}}]"})
(nrepl/message {:op "eval" :code "(do {:a :b: :c [1 2 3 4] :d #{5 6 7 8} :e (range 20)})"})
nrepl/response-values
))
just tried sharing a screenshot — but there’s no storage left in this slack
anyway I need to figure out now how to run this middleware with cider
@U06HHF230 Do you know how to run this with leiningen based project and Emacs/Cider?. I tried to look around but not sure how to add nrepl middleware to my project...
I was trying to get that working last night — but ran into some issues that I haven’t resolved
I’ve pushed where I got to, though it doesn’t quite work.
I’ve updated the README.md with something close to what you’ll need in profiles.clj
.
Though it may be there are code changes needed too.
You’ll also need to lein install
nrebl.middleware from source.
I’m out today — but if you can figure it out that would be amazing
so I can actually do it from my real repl
I think I need to modify this command to inject my middleware:
clj -Sdeps '{:deps {nrepl {:mvn/version "0.4.5"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
lol turns out I already have the incantation in my repl history… well done me of the past!
Yeah i think that should do it
can confirm that if you add a middleware in the first position of the vector above it should wrap the cider-middleware
thanks
something else isn’t working now — debugging