Skip to content
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

Restarting a repl does not connect to same port #1895

Closed
bostonaholic opened this issue Dec 22, 2016 · 5 comments · Fixed by #1905
Closed

Restarting a repl does not connect to same port #1895

bostonaholic opened this issue Dec 22, 2016 · 5 comments · Fixed by #1905

Comments

@bostonaholic
Copy link

Expected behavior

cider-restart should connect to the same host:port as when I used cider-connect.

  1. cider-connect to connect to a repl running on localhost:6005.
  2. Then call cider-restart.
  3. The new repl should connect to localhost:6005 as before.

Actual behavior

cider-restart seems to use cider-jack-in instead, and does not connect to the repl running on localhost:6005.

@bbatsov
Copy link
Member

bbatsov commented Dec 24, 2016

This should be easy to implement. I wonder why no one noticed it for so long. :-)

@xiongtx
Copy link
Member

xiongtx commented Dec 24, 2016

Should we change cider-jack-in to read the .nrepl-port file? Or use a different command?

@bbatsov
Copy link
Member

bbatsov commented Dec 24, 2016

Should we change cider-jack-in to read the .nrepl-port file?

Not sure how this is related. We simply need to remember the old connection port prior to restarting the REPL (this should do jack-in at all but simply do cider-connect again).

@xiongtx
Copy link
Member

xiongtx commented Dec 24, 2016

Not sure how this is related.

cider-restart calls cider--restart-connection, which calls cider-jack-in.

@bbatsov
Copy link
Member

bbatsov commented Dec 25, 2016

I'm aware of this. :-) But the actually fix would involve tagging connections with some marker denoting how they were created (using jack-in or connect) and in the case of the latter just re-invoking cider-connect for the appropriate host/port. That's why I was curious how cider-jack-in plays into this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants