This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-30
Channels
- # announcements (12)
- # babashka (25)
- # biff (30)
- # cherry (34)
- # cider (46)
- # clj-kondo (23)
- # clojure (37)
- # clojure-berlin (6)
- # clojure-europe (12)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-uk (2)
- # clojurescript (8)
- # conjure (1)
- # cursive (4)
- # data-science (11)
- # datalevin (12)
- # datascript (15)
- # emacs (2)
- # events (1)
- # fulcro (14)
- # graalvm (16)
- # gratitude (23)
- # honeysql (11)
- # jobs (2)
- # jobs-discuss (14)
- # kaocha (1)
- # leiningen (8)
- # nbb (45)
- # off-topic (7)
- # portal (8)
- # re-frame (9)
- # releases (2)
- # shadow-cljs (24)
- # squint (5)
- # tools-build (17)
- # tools-deps (7)
- # vim (5)
For a long time, I've relied on the fact that when I do M-x cider-connect
it reads the nrepl port out of .nrepl-port
- when I updated recently, I notice that it is also reading the port from .shadow-cljs/nrepl.port
... so whereas before it could usefully autocomplete, now I have to go read the port files myself to see which is which.
Is there a way to disable it?
I assume the related code is:
(defun nrepl-extract-ports (dir)
"Read ports from applicable repl-port files in directory DIR."
(delq nil
(list (nrepl--port-from-file (expand-file-name "repl-port" dir))
(nrepl--port-from-file (expand-file-name ".nrepl-port" dir))
(nrepl--port-from-file (expand-file-name "target/repl-port" dir))
(nrepl--port-from-file (expand-file-name ".shadow-cljs/nrepl.port" dir)))))
The change was made so that CIDER would consider every possible nREPL that's running for a particular project, which is the better behavior IMO.
@U051BLM8F I think it would make more sense if metadata about where the port came from was maintained, because a list of a large integers isn't really useful as an enduser if I can't distinguish which one belongs to which sort of process. Or maybe some kind of preference mechanism could exist?
I'm always open to ideas for improvements, so feel free to file a ticket about this. I agree that pairing the port number with the file it came from makes sense.
hey all… I am running into
error in process filter: user-error: ClojureScript is not available. See for details
error in process filter: ClojureScript is not available. See for details
on a project that has worked for years. obviously emacs must have upgraded something on me; and yes I have gone to that link!it’s totally unclear to me what is going wrong locally, and unfortunately nothing on the page, paired with that generic message, is illuminating.
sending full error message…
[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"} cider/piggieback {:mvn/version "0.5.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}}' -M:test:dev/repl:cider/nrepl
[nREPL] server started on 52185
[nREPL] Establishing direct connection to localhost:52185 ...
[nREPL] Direct connection to localhost:52185 established
error in process filter: user-error: ClojureScript is not available. See for details
error in process filter: ClojureScript is not available. See for details
after running cider-jack-in-cljs
and selecting node
node is present
bare cljs, but shadow fails as well
shadow starts but then that same error comes up
npx shadow-cljs node-repl
works fine at the command linedo you mean clj
, clojure?
is there a cljs binary?
I didn’t even know that that was a thing!
no mention of a standalone cljs command anywhere here and I’ve never done that. that would be an obvious issue then since I don’t have it 🙂
i am not talking about a standalone cljs command. I’m talking about the clojurescript jar present on your classpath
can you give me a way to see what the classpath is, in the context of the command that cider-jack-in-cljs
is running?
sorry, missed your image
okay that’s closer. I have (cider-clojure-cli-aliases . ":test:dev/repl")
in dir locals;
but the cljs dep is under a different alias
sounds like I need to get the cljs alias in there too
yeah. you are asking it to start up a clojurescript repl but it cannot possibly do so
yes, but think of the debug steps:
• that image is saying to put the clojurescript dep at the top level of deps.edn, which is poor form for any library;
• realistically it’s always in an alias, which you can tune with an emacs variable documented somewhere else
• that alias is set in a .dir-locals.el
file, and named cider-clojure-cli-aliases
, which you might imagine is separate from some cljs variable
• that all requires some knowledge of how deps.edn aliases are layered, which is fine;
“:yeah. you are asking it to start up a clojurescript repl but it cannot possibly do so” this was clear from the behavior 🙂
I appreciate the help, just pushing back on the hint, maybe misperceived, that the deduction chain here was super obvious
That image is from the document you linked me. I pointed to the step I was talking about
a better error might say “the clojurescript jar is missing from the classpath. you’re currently using deps.edn with the following aliases configured: <blah blah>. make sure that an entry like [clojurescript “blah”] is present in the :deps` value for one of those aliases.”
That’s an excellent suggestion. If you made an issue I suspect there would be some interest
> “then the error message that it cannot find clojurescript seems very apt” it was apt! just not as helpful as you were!
Sorry. I’ve seen this error pop up when things will actually work out. So part of my diagnosis is finding out if this is correctly erroring and it cannot work, or if it is erroring but it would have worked if we weren’t trying to be clever
sure, that makes sense. definitely not an easy problem, with so many editors, build setups etc
Hi there, I started to use cider-clojure-cli-aliases
and the repl starts fine in the terminal but in Emacs I see:
[nREPL] server started on 35395
[nREPL] Establishing direct connection to localhost:35395 ...
[nREPL] Direct connection to localhost:35395 established
error in process filter: cider--gather-connect-params: This is not a REPL or SERVER buffer; is there an active REPL?
error in process filter: This is not a REPL or SERVER buffer; is there an active REPL?
Does anybody know what is going on?Never mind, I restarted Emacs and I don't see the error anymore