-
-
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
Can't connect to multiple nrepls #1122
Comments
Hmm, that's pretty odd. @expez @benedekfazekas @cichli Can you reproduce this problem? |
@arohner I can't reproduce this. I'd suggest going through the "Troubleshooting" section of the README and debugging interactively the REPL init to see what goes wrong for you. |
I've enabled toggle-debug-on-error. No popups. Nothing suspicious in Messages. Attempting to type in the 'broken' repl results in the following in nrepl-messages:
|
Seems it's trying to evaluate code in some unknown session, but without being able to reproduce it we'll have hard time fixing it. |
I think I have the same problem, however I can workaround by opening a different buffer than the first REPL before entering cider-connect. Btw. this problem existed in Cider 0.8 already. |
Bumping this because I hit it just now. With one nREPL connection to a work host, I was unable to open a second connection to the same host on CIDER 0.9 |
Can some of you investigate this in |
The problem is that when a REPL is currently open, nrepl-connection-buffer is set to it. All requests are made to that repl buffer instead of the newly created buffer. A workaround is to modifiy nrepl-start-client-process so that nrepl-connection-buffer is nil before nrepl--init-client-sessions is invoked, so that the buffer is looked up in the connection ring. I'd make a PR but my knowledge of this codebase is too narrow to fix it appropriately. |
OK, got it. That's why I couldn't reproduce this - I never started the second connection when in a REPL buffer. @vspinu You authored this code. Would like to fix it or should I do this? |
Me too.
Fixed. |
[Fix #1122] Run client initialization in new client buffer
Running cider git checkout of HEAD, 3487955
I'm trying to create multiple nrepl connections, to multiple processes, and can't. A typical workflow for me is to have a CLJ nrepl running, and a second to figwheel, for CLJS.
Steps:
M-x cider-connect "localhost" 6005
M-x cider-connect "localhost" 7888 (figwheel nrepl)
The first connection works just fine. The second connection is "defective". M-x cider-connect reports "Direct connection established", but emacs doesn't automatically open the second buffer. If I manually switch to "cider-repl localhost<2>", there is no repl prompt, and typing in the buffer has no effect.
If I kill both buffers, do the steps in opposite order, and get same result:
M-x cider-connect "localhost" 7888
M-x cider-connect "localhost" 6005
In this case, the 7888 buffer works correctly, and the 6005 buffer is defective.
The bug doesn't appear to have anything to do with figwheel, I can also reproduce it using two normal CLJ nrepls:
M-x cider-connect "localhost" 6005
M-x cider-connect "localhost" 6006
Note that connecting to the same process twice works fine:
M-x cider-connect "localhost" 6005
M-x cider-connect "localhost" 6005
In this case, both buffers work as expected.
The text was updated successfully, but these errors were encountered: