-
-
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
xref navigation of Clojure methods #180
Comments
Does anyone know if there's some existing API we can leverage to retrieve this info? |
Looks like there's some data available via See https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/MultiFn.java#L579-L581 |
There's
EDIT Indeed they are the same: see https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L1803-L1807 |
Do we have a source location for the results of |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it. |
Just to note that dumb-jump (https://github.com/jacktasia/dumb-jump) works with multimethods — it lets you select from all the methods of a multimethod. It only works within the current project, though. |
Could grep through the jars on path too to get the rest, right? |
I think implementing this in the middleware is the simplest path, it's just a matter of someone finding the time to do it. Grepping is easy, but it's never accurate. |
Does Orchard support this? |
Not yet. |
defmethods aren't vars and don't have metadata. What would the alternative to grepping be in this case? |
I've moved this issue to Orchard.
> (methods print-method)
{nil #function[clojure.core/fn--7368],
clojure.lang.IRecord #function[clojure.core/fn--7480],
refactor_nrepl.inlined_deps.rewrite_clj.v1v1v47.rewrite_clj.node.meta.MetaNode
#function[refactor-nrepl.inlined-deps.rewrite-clj.v1v1v47.rewrite-clj.node.protocols/make-printable!/fn--422],
refactor_nrepl.inlined_deps.rewrite_clj.v1v1v47.rewrite_clj.node.stringz.StringNode
#function[refactor-nrepl.inlined-deps.rewrite-clj.v1v1v47.rewrite-clj.node.protocols/make-printable!/fn--422],
java.lang.Character #function[clojure.core/fn--7486],
clojure.lang.MultiFn
#function[cider.nrepl.print-method/eval825998/fn--825999],
refactor_nrepl.inlined_deps.rewrite_clj.v1v1v47.rewrite_clj.node.regex.RegexNode
#function[refactor-nrepl.inlined-deps.rewrite-clj.v1v1v47.rewrite-clj.node.protocols/make-printable!/fn--422],
,,, We can take those function objects, infer the namespace that backs them, and read their whole source in search of something like looks like a matching defmethod. i.e. bit of a mixture of static and dynamic approaches 😄 |
(Feature request)
It would be good to have a way of viewing and navigating to all the methods for a multimethod.
Two things I've seen before (in LispWorks for Common Lisp) are:
The text was updated successfully, but these errors were encountered: