This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-26
Channels
- # aleph (1)
- # announcements (9)
- # aws (6)
- # babashka (18)
- # babashka-sci-dev (25)
- # beginners (79)
- # calva (30)
- # cider (34)
- # clj-kondo (25)
- # cljsrn (6)
- # clojure (26)
- # clojure-australia (1)
- # clojure-europe (6)
- # clojure-norway (1)
- # clojure-poland (6)
- # clojure-uk (3)
- # clojured (2)
- # clojurescript (14)
- # datomic (19)
- # events (1)
- # google-cloud (1)
- # gratitude (2)
- # helix (1)
- # hyperfiddle (2)
- # interceptors (1)
- # jobs (17)
- # joyride (96)
- # leiningen (5)
- # lsp (20)
- # minecraft (2)
- # nbb (5)
- # other-languages (1)
- # re-frame (34)
- # releases (2)
- # shadow-cljs (15)
- # spacemacs (1)
- # xtdb (19)
CIDER 1.4.1 is out https://github.com/clojure-emacs/cider/releases/tag/v1.4.1
@bozhidar Thanks for the nREPL improvements. I just tried connecting to an nbb server with CIDER 1.4.1 but it still didn't work for me
I still have to go into clojure-mode
to be able to evaluate things from a .cljs
buffer. Connecting with clojurescript-mode
and then choosing the custom
REPL type doesn't do it either
cc @U07SQTAEM - Perhaps also try with Hubble?
thanks for the release from me as well!! Also tried it with the clerk nrepl and connecting worked but not eval so the same behavior that you saw @U04V15CAJ
That's a different problem and it will be addressed separately. Basically the issue is that CIDER now thinks that the connection in Clojure not ClojureScript. There are a couple of ways to solve this, but I'm still wondering what's the best option.
I'm guessing that manually setting the type of the connection should fix this problem as well.
Still, I'm thinking that probably a better fix would be to just dispatch to whatever connection there is if there's a single connection within a session and just disregard the connection type check.
Is it cider-set-repl-type
emacs function?
Yep. More on the subject - https://docs.cider.mx/cider/repl/configuration.html#repl-type-detection
You can ignore the part about the middleware, as this is only relevant to hosted ClojureScript REPLs.
While I agree with @U04V15CAJ that it shouldn't matter whether it's a clj or cljs REPL for connect to work, in the meantime should we be able to use cider-connect-cljs
?
what’s this needed for? Might be nice if we could get at least the https://nrepl.org/nrepl/ops.html (especially eval + completions) could work without a repl detection?
@U07SQTAEM No, cider-connect-cljs didn't work either :/ You still need the custom snippet, I documented that here: https://github.com/babashka/scittle/tree/main/doc/nrepl#cider
> could work without a repl detection Yes, that's the whole point of just using nREPL as a protocol, there should be no REPL type detection necessary, or at least, if you try to do it, fall back on something that assumes nothing specific.
cider-connect-cljs
doesn't work for non-hosted REPLs yet, which is part of the problem.
@U04V15CAJ The REPL type is needed mostly because a common workflow was to have 2 different REPLs for the same project and we needed some way to figure out which evaluations to go into which REPL. That's not really related to nREPL, but was rather an artefact of how people were using CIDER.
In hindsight I almost regret moving away from the early design where you simply had to select what REPL you want to use manually. This worked flawlessly, but required people to do some manual work when running multiple REPLs.
All the logic to detect automatically which REPL is related to which source file resulted in some problems.
@U04V15CAJ Yep. Sesman replaced the old code in CIDER, but it didn't really solve anything related to the REPL types. It's main focus what to simplify the grouping of REPLs by mapping them to project paths.
You can still have different types of REPLs in the same project and you need to figure out which one you want to use.
Anyways, all of this is fixable, I'm just trying to explain that this time around the problem is not really nREPL-related. I'm still wondering how to best address this in CIDER.
@U5H74UNSF This detection is mostly for the purpose of not sending the code to be evaluated in the wrong REPL. This may or may not be a problem depending on one's perspective.
I see, yeah this would become less automatic but maybe manual selection is actually good here? I’m often confused when things get evaluated in two repls.
Seems like a buffer-local variable binding would be good for this — though less convenient than magical auto-detection, obvs.
Yeah, there are workarounds, but ideally things should just work out-of-the-box for everyone. I'll keep thinking about a proper solution.
To give you a bit more context - the problem is the cider-repls
functions, which we happen to be discussing in a PR currently https://github.com/clojure-emacs/cider/pull/3201/files