This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-20
Channels
- # adventofcode (8)
- # aleph (2)
- # announcements (10)
- # aws (5)
- # aws-lambda (2)
- # babashka (23)
- # beginners (23)
- # biff (9)
- # calva (4)
- # cider (8)
- # clj-kondo (21)
- # clojure (77)
- # clojure-boston (1)
- # clojure-dev (50)
- # clojure-europe (36)
- # clojure-gamedev (3)
- # clojure-nl (1)
- # clojure-norway (3)
- # clojure-spec (33)
- # clojure-uk (3)
- # clojurescript (22)
- # core-async (3)
- # cursive (10)
- # datahike (18)
- # datalevin (1)
- # datascript (9)
- # deps-new (21)
- # emacs (11)
- # events (1)
- # graphql (11)
- # guix (26)
- # java (7)
- # jobs (3)
- # lsp (12)
- # malli (6)
- # pathom (33)
- # pedestal (3)
- # polylith (15)
- # reagent (5)
- # releases (3)
- # remote-jobs (1)
- # scittle (9)
- # sql (27)
- # tools-build (9)
- # vim (7)
I’m running doom-emacs with latest unpinned cider (I’ve upgraded after seeing the same behavior on cider 1.5.0). I can connect via cider-connect-clj
to an nrepl running from the terminal. After evaling one or a couple of expressions (hard to reproduce the minimum number of operations) the repl buffer closes and I see [nREPL] Connection closed
in *Messages*
. It could also be a timing issue - maybe it just closes after ~1 minute.
Does this ring a bell to anyone? Any tips on how I can debug this further?
This is on a new M1 macbook (in case that could be related); so I can’t say that it started happening after a certain upgrade, etc.
Could the port be getting stomped by another process? And do you have https://docs.cider.mx/cider/troubleshooting.html#debugging-the-communication-with-nrepl turned on?
Thanks for following up; I’ve been struggling with this for a couple of days and I found a temporary workaround for now. It looks like this is somewhat related to doom-emacs (workspaces / doom / evil-mode / ???), such that it looks like some set of operations call evil-quit
which then causes cider to disconnect after a short delay (presumably via cider-quit
).
The workaround I discovered on doom-emacs discord is to switch the buffer repl and close it immediately:
(map! :map cider-repl-mode-map
(:localleader
"s" #'(lambda ()
(interactive)
(switch-to-buffer "*Messages*")
(delete-window))))
This is the way I like to work anyway (with the actual repl buffer hidden), so it is not a problem for me. And for whatever reason, this approach works: the repl sits quietly in the background and cider does not disconnect.
👍:skin-tone-3: