-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Provide cider function to find all known impls of a protocol function #204
Comments
(Moved from cider-nrepl) |
Related discussion on Clojurians slack: https://clojurians.slack.com/archives/C0617A8PQ/p1729784739018019 Super interesting, thank you @vemv for the pointer here. Do people have strong feelings on implementing this with/without kondo? Is it possible to do it without kondo? |
I think that using clj-kondo would be a quite natural thing (to be done in cider-nrepl though - not Orchard). cider-nrepl already uses a variety of libs. It would be a large undertaking though with many possible ramifications and implications. So my thinking is that we could also read .clj-kondo / clojure-lsp directories on the fly, no lib involved, using some heuristics to determine if the contents are fresh, and finally, double-checking if the results makes sense (i.e. do they look like protocol impls). (This thinking comes from the observation that many users of commercial codebases regularly run kondo / lsp locally in some or other way, or have a means to trigger a CI-oriented script) It's also possible to roll our own static codebase parsing, although I wouldn't underestimate its complexity (and proneness to false positives / negatives). I'd reserve the technique for simpler use cases, as I outlined in another issue #181 Cheers - V |
Relevant bit of clj-kondo analysis config: https://github.com/clj-kondo/clj-kondo/tree/master/analysis#extra-analysis Need to include c.f., this issue as well (with some additional hints in it): |
The feature-request has been posted on "cider"
clojure-emacs/cider#1969
Creating an issue here to send a pull request and start a discussion about the solution.
The text was updated successfully, but these errors were encountered: