-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle multiple REPL types for single project #2923
Conversation
Hmm, that's weird. If I recall correctly sibling REPLs were supposed to be in the same session, otherwise they are basically unrelated. |
@vspinu might be able to provide more insight here. |
As it happens I have started working with clojure/Cider 2 days ago after a more than a year break and immediately stumbled over this (or maybe related) issue but didn't have time to investigate. One of the ways to reproduce my issue is to jack in twice, C-z works. Then C-c C-q on one of the processes, C-z will no longer work from the original file even though the linking is there. The reason is that cider-mode is no longer installed in those buffers. One need to revert the buffer to get C-z working again. @otwieracz Could you check if you really have cider-mode t in the buffer that you C-z from?
I think you are not starting the "sibling" repl, but a new repl if you press "y". That prompt is quite confusing. "Proceed Y/N?" means create a new server session altogether, not a sibling. I cannot judge the proposed solution as I forgot the details. But the change seems unrelated to the "cider-mode disappearence" which is the culprit in my case. |
Yes, I've got
Unfortunately, there's no other way than hitting
|
See the conversation in #2946 and the updated message. Basically after pressing "n" you're expected to run |
@bbatsov unfortunately I am still getting a lot of issues with this approach: After commenting-out my modifeid
|
My setup (approximate):
I expect FYI, with most recent CIDER in Emacs 28 the message indeed changed but other than that problems still persist... (and my hack stopped working):
It should start new |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it. |
Handle multiple REPL types for single project
Goal of this PR is to handle the issue:
lein
andshadow-cljs
working in one directory tree:.clj
file, jack-incider-jack-in-clj
(cider-switch-to-repl-buffer)
- works fine.cljs
file, jack-incider-jack-in-cljs
, accept creation of sibling REPL.(cider-switch-to-repl-buffer)
- fails with messageuser-error: No clj REPLs in current session "project/project:localhost:63409"
Root cause
sesman
sessions created linked to the same project:(cider-repls)
uses(sesman-current-session)
to get only one matching session for project (even though there might be more than one) without taking type into consideration. Then it matches type against the single result.Proposed solution
cljc
file detection, consult(cider-repl-type)
function. This enables easy change of REPL type for CLJC buffer (which might be simultaneously used by both REPLs) with snippet like (in spacemacs):