This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-23
Channels
- # announcements (11)
- # babashka (35)
- # beginners (110)
- # calva (2)
- # cider (46)
- # clara (5)
- # clj-kondo (29)
- # cljdoc (4)
- # cljsrn (59)
- # clojure (163)
- # clojure-brasil (3)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (10)
- # clojure-sweden (1)
- # clojure-uk (36)
- # clojurescript (58)
- # conjure (24)
- # cursive (19)
- # data-science (14)
- # datascript (1)
- # datomic (10)
- # docker (3)
- # expound (6)
- # figwheel-main (17)
- # fulcro (16)
- # graalvm (1)
- # leiningen (9)
- # malli (11)
- # off-topic (22)
- # parinfer (1)
- # pathom (1)
- # re-frame (18)
- # reagent (18)
- # reitit (3)
- # ring (3)
- # shadow-cljs (8)
- # spacemacs (3)
- # specter (79)
- # sql (20)
- # tools-deps (25)
- # vim (4)
- # xtdb (8)
I am trying to follow the instruction here to get and embedded nrepl server. It works without the cider-nrepl-handler but when I add it I start getting null pointer exceptions. Not really sure how to start debugging this. using
[nrepl "0.7.0"]
[cider/cider-nrepl "0.25.2"]
with exceptions
ERROR: Unhandled REPL handler exception processing message {:op out-subscribe, :session ae41ee90-9689-44cf-b204-c1381837eeb0, :id 5}
ERROR: Unhandled REPL handler exception processing message {:op classpath, :session ae41ee90-9689-44cf-b204-c1381837eeb0, :id 6}
java.lang.NullPointerException
at clojure.core$deref_future.invokeStatic(core.clj:2300)
at clojure.core$deref.invokeStatic(core.clj:2320)
at clojure.core$deref.invoke(core.clj:2306)
at cider.nrepl$wrap_out$fn__8686.invoke(nrepl.clj:312)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_undef$fn__8740.invoke(nrepl.clj:471)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_apropos$fn__8622.invoke(nrepl.clj:118)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_test$fn__8722.invoke(nrepl.clj:420)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at nrepl.middleware.print$wrap_print$fn__8181.invoke(print.clj:234)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_trace$fn__8728.invoke(nrepl.clj:442)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_tracker$fn__8734.invoke(nrepl.clj:460)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at cider.nrepl$wrap_complete$fn__8634.invoke(nrepl.clj:132)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at nrepl.middleware.sideloader$wrap_sideloader$fn__8431.invoke(sideloader.clj:102)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at nrepl.middleware.session$session$fn__8380.invoke(session.clj:297)
at nrepl.middleware$wrap_conj_descriptor$fn__7978.invoke(middleware.clj:16)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:19)
at nrepl.server$handle_STAR_.invoke(server.clj:16)
at nrepl.server$handle$fn__8442.invoke(server.clj:36)
at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
So, after adding cider/cider-nrepl to my ~/.shadow-cljs/config.edn
things seem to be working well now.
Its noted that cider's test functions don't work for cljs, what's the conventional way to run cljs tests in the repl?
I know some people just add a simple command that wraps the test runner. There’s also https://github.com/magnars/kaocha-runner.el which probably works in such cases.
@ramblurr shadow-cljs comes with a JS test runner https://shadow-cljs.github.io/docs/UsersGuide.html#_testing
Yea, that's what I'm using now. Its works well enough, but I miss being able to run single tests when working on one little issue like I can in normal clj+cider
Yeah for me runs fast enough (actually instant for the tests I have) where I don't mind.
i get the following error when i try to start an nrepl commandline:
➜ aft git:(master) ✗ clj -R:nrepl -m nrepl.cmdline
Execution error (FileNotFoundException) at nrepl.cmdline/require-and-resolve (cmdline.clj:194).
Could not locate refactor_nrepl/middleware__init.class, refactor_nrepl/middleware.clj or refactor_nrepl/middleware.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
I assume the solution here is to add refactor nrepl to my deps but the docs i was reading dont mention it.{:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.0-alpha4"} cider/piggieback {:mvn/version "0.5.0"}}}
:repl {:extra-deps {cider/cider-nrepl {:mvn/version "0.25.2"}
refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"}
cider/piggieback {:mvn/version "0.5.0"}}
:extra-paths ["env/dev/resources" "env/dev/clj"]
:main-opts ["-m" "nrepl.cmdline" "--middleware"
"[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}
this is what I have in minecorrect, im not running from emacs
is my nrepl dep really old? i tried to get the latest but mine says 8 and yours 25
oh thats cider nrepl on yours
if the goal is to launch a server that a nrepl port i can talk to so i can develop in a different context. then i wouldn't need cider which is for emacs
btw clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.0-alpha4"}}}'
works for me without error
clj -Sdeps '{:deps { cider/piggieback {:mvn/version "0.5.0"}, nrepl/nrepl {:mvn/version "0.8.0-alpha4"}}}'
works for me... maybe something else going?
but those dont pass a main option
-R:nrepl without piggy (and likely with) starts a repl. when i pass -m nrepl.cmdline it throws that error
ah forgot the main fn,
clj -Sdeps '{:deps { cider/piggieback {:mvn/version "0.5.0"}, nrepl/nrepl {:mvn/version "0.8.0-alpha4"}}}' -m "nrepl.cmdline"
nREPL server started on port 44073 on host localhost -
this invokation works for memaybe search your project for any hard references to refactor-nrepl or if deps.edn is merging config from somewhere else?
ill do a clean
That invocation fails for me in my project. would Sdeps override whats in my deps file? my ./clojure/deps.edn fils is empty. Is there any stale state that would be lying around?
does it work outside the project folder? i'm not sure to be honest about your question -- i would assume so
it fails outside the project folder too.
huh. thanks, ill look into this more
what version of clojure are you running?
@U0DHHFEDP this command works for me: ➜ ~ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.25.2"} }}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" nREPL server started on port 46293 on host localhost - <nrepl://localhost:46293>
"1.10.1.502"
clj -Sdeps -Srepro '{:deps { cider/piggieback {:mvn/version "0.5.0"}, nrepl/nrepl {:mvn/version "0.8.0-alpha4"}}}' -m "nrepl.cmdline"
nREPL server started on port 44073 on host localhost -
if i run
clj -Srepro -Sdeps '{:deps {cider/piggieback {:mvn/version "0.5.0"} nrepl/nrepl {:mvn/version "0.8.0-alpha4"}}}' -m "nrepl.cmdline"
(note you have to reverse the options from what you posted) i get the same missing refactor middleware error