This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-02
Channels
- # announcements (34)
- # babashka (19)
- # beginners (106)
- # calva (50)
- # cider (25)
- # clj-commons (39)
- # clj-kondo (16)
- # clojure (59)
- # clojure-czech (3)
- # clojure-europe (33)
- # clojure-norway (9)
- # clojure-seattle (1)
- # clojure-sweden (1)
- # clojure-uk (2)
- # clojured (28)
- # clojuredesign-podcast (1)
- # clojurescript (7)
- # code-reviews (19)
- # conjure (15)
- # cursive (3)
- # datomic (3)
- # emacs (21)
- # etaoin (28)
- # graphql (4)
- # introduce-yourself (1)
- # joyride (2)
- # kaocha (2)
- # london-clojurians (8)
- # lsp (24)
- # music (4)
- # nbb (4)
- # nextjournal (1)
- # off-topic (13)
- # other-languages (16)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # shadow-cljs (40)
- # tools-deps (15)
I'm trying cider-jack-in
but I'm getting:
[nREPL] Starting server via /opt/homebrew/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} cider/cider-nrepl {:mvn/version "0.28.4"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Execution error (FileNotFoundException) at nrepl.cmdline/require-and-resolve (cmdline.clj:201).
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.
Full report at:
/var/folders/j9/xmjlcym958b1fr0npsp9msvh0000gn/T/clojure-16565661702086264971.edn
error in process sentinel: Could not start nREPL server: Execution error (FileNotFoundException) at nrepl.cmdline/require-and-resolve (cmdline.clj:201).
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 did the same on my machine, and that worked. Mine, however, included refactor-nrepl/refactor-nrepl {:mvn/version "3.2.0"}
in the -Sdeps
string.
It seems like your --middleware
and -Sdeps
are not playing nicely with each other, since one includes refactor-nrepl, and the other doesn't. Could be some emacs settings?
This is the whole logic, it should be easy to detect what's wrong https://github.com/clojure-emacs/clj-refactor.el/blob/f368c56c83843396b160440f472a661a3b639862/clj-refactor.el#L4200-L4221 Basically you want either: • refactor-nrepl added to cider-jack-in-dependencies • refactor-nrepl.middleware/wrap-refactor removed from cider-jack-in-nrepl-middlewares
Note that this all happened automatically. I'm not sure if I added any config that made it behave different than it should
It would be appreciated if you could eval those simple forms and detect what went wrong :)
@U45T93RA6 I appreciate you trying to help! Which forms should I evaluate? cljr--inject-jack-in-dependencies)
inside an elisp session?
My suggestion is to try determining why cider-jack-in-dependencies
doesn't include refactor-nrepl according to those lines of code
specifically: (and cljr-inject-dependencies-at-jack-in (fboundp 'cider-add-to-alist) (boundp 'cider-preferred-build-tool) (boundp 'cider-jack-in-dependencies) (boundp 'cider-jack-in-lein-plugins) (boundp 'cider-jack-in-nrepl-middlewares))
M-:
is your friend btw, a repl can have a slightly different context https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html
that's strange, considering the two conditions evaled to true maybe you switched projects as you started Emacs, sth like that? Or otherwise, somehow things evaled differently before (around Emacs init time) and now
(some quick measures: ensure emacs and clj-refactor.el are both at latest stable, and remove .elc files)
I came to the channel to ask about this same issue. Glad to see this thread — thanks folks 🙂 Upgrading from clj-refactor from 3.2.2 to 3.5.2 fixed my environment as well. I suspect this behavior arose when I last upgraded CIDER.
