-
-
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
Enhance cider-connect
to show all nREPLs available ports, instead of only Leiningen ones
#3399
Conversation
@ag91 feel free to try this one locally.
|
(nrepl--port-from-file (expand-file-name ".nrepl-port" dir)) | ||
(nrepl--port-from-file (expand-file-name "target/repl-port" dir)) | ||
(nrepl--port-from-file (expand-file-name ".shadow-cljs/nrepl.port" dir)))) | ||
(condition-case nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking to tackle this with with-demoted-errors
(although also ignore-errors
would do here if you don't want to let the user know about what caused the ignored error): maybe it saves some code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sounds reasonable.
Now that I think it, we may want to catch errors for each individual directory entry, instead of for the whole call, so that one bad dir doesn't cause all its neighbors to be excluded.
(setq paths (cons (match-string 1) paths))))) | ||
(seq-uniq paths))) | ||
Search for lein or java processes including nrepl.command nREPL" | ||
(append (cider--invoke-running-nrepl-path #'cider--running-lein-nrepl-paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't expect duplicates here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't expect duplicates here?
They're handled in the cider--running-nrepl-paths
callsite. Which seems better since cider-locate-running-nrepl-ports
can cons
an element to it, so you'd have to run seq-uniq again
This will use resources more carefully.
…f only Leiningen ones Fixes #3390
Rehash of #3392 with some improvements directly applied, while preserving attribution:
awk
)<dir, port>
pairs is returned, instead of justdir
/Users/$USER/Desktop
And a minor CI improvement expressed in a separate commit.
I've QA'd all code paths - it works as intended:
Cheers - V