-
-
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
When using cider-connect with localhost nrepls running, those ports are not shown among the available ones #3390
Comments
Hi! Thanks for the detailed issue.
This very likely aims to make it possible to connect to repls that were created outside of CIDER, in the terminal, especially if their pwd is not the
I agree. However I think we could take the current
to:
WDYT? |
Sounds reasonable. |
I looked into it a bit and a thing to note: Also would it be wrong to look for processes that mention And how do you usually test these kind of changes? I am using a Linux machine, so I will be confident for those bash commands, but MacOS (and Windows?!). |
Yes, I had the impression that that's for better usability (this way one can present the "context" for each port in the
I'm not sure about inspecting java processes that match ...If including such processes excessively complicated things, I'd be willing to exclude them.
Currently As long as we stick to simple primitives like ps/grep, we can be fine with no testing / just a one-off round of QAing. I can try it on my macbook while reviewing a PR. Cheers - V |
Expected behavior
For a running nrepl on localhost, I expected
(cider-select-endpoint)
to allow me to select ports on which nrepl is running.(I use this to connect ob-clojure buffers to cider when doing literate programming and a bit of completion comes handy)
Fixes #3390
Actual behavior
It requires me to input the port manually.
Steps to reproduce the problem
or more specifically:
(cider--running-nrepl-paths)
My solution
Just for curiosity, I redefined
cider--running-nrepl-paths
(which seems to be the culprit) as follows:That way things seem to work fine (for localhost).
I opened an issue because I think
cider-ps-running-nrepls-command
andcider-ps-running-nrepl-path-regexp-list
are somewhat outdated. I replaced the behavior going via Emacs active buffers.Any chance you can clarify why cider is looking for active nrepl via a terminal command (greping for leiningen -- I didn't find anything using that command manually)?
If this solution seems useful, I could look into opening a PR :)
CIDER version information
1.8.0-snapshot
Lein / Clojure CLI version
lein 2.9.1 / 1.10.3
Emacs version
28.1
Operating system
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: