-
-
Notifications
You must be signed in to change notification settings - Fork 649
Cannot jump to Java symbols #2819
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
Comments
Have you installed the JDK source package? You have to have the JDK sources on your classpath for the lookup to work. You can also point CIDER manually to some sources using |
Hey @bbatsov so I did install the docs and source for the icedtea-3.* package which is basically java 8. I also saw in the docs to set For what it's worth, when there is a backtrace involving a java class, I can go directly to the file but I cannot do this in say a normal buffer containing a java class, i.e. |
Adding the directory of the extracted Java src.zip to the
I can confirm that I am using a CIDER: 0.25.0snapshot (package: 20200227.1414) |
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! |
Echoing @jr0cket above - I spent the past few hours reading through all the related issues and the only thing that seemed to work to enable For example, added to
I had almost given up, and in fact after trying last night before finding this tip I had installed Cursive and spent a few hours porting all my shortcuts over. I'm not sure how Cursive has accomplished this, but when setting up a lein project, there was no need to specify source, it just worked. The I know it was mentioned above that it largely depends on the build tool, but somehow they've got it working in Cursive so there must be a path. My primary concern with this approach is that when I change JDK at some point in the future, I'll likely forget to adjust the Anyhow - just thought I'd leave this here for future reference, and to mention that I think it is still an open issue as some others of similar nature have been consistently marked stale. Also I don't want to give the impression I keep mentioning Cursive as some sort of slight towards CIDER, which I love, just wanted to mention that they seem to have a solution which could possibly inform this issue. EDIT: I celebrated prematurely. Jumping to Java source only works some of the time, probably due to type inference issues but I can't be certain. I guess for heavy interop projects this just might not be in the cards. |
IntelliJ knows a lot about Java sources in general. :-) It's hard for us to match their work. Btw, CIDER's approach used to work for years pretty well without much additional setup for the JDKs, so I'm still puzzled what went wrong on JDK 8 (on JDK 9+ it's clear that the modules messed up everything). The situation is definitely fixable, but I haven't had time to dive into this for a while now. Potentially you can address the problem by using
If you can provide more details about the issues that'd be helpful. |
I think may be (yet another) duplicate of clojure-emacs/orchard#103. |
A working solution goes like this:
|
I appreciate you taking the effort to post a work-around @vemv but jump-to-source is table-stakes for any editor and it should be something that just works without tinkering (easier said than done I'm sure). It seems after more than a year that this is still not the case, which is unfortunate but I suppose beggars can't be choosers. |
We're working on it! I'm also not posting a workaround, but a preview of how CIDER will work. You can get the same featureset today by performing those steps. That would be actually valuable feedback. We prefer to find surprises today than after a big announcement. Cheers - V |
Revamped documentation: https://docs.cider.mx/cider/config/basic_config.html#use-enrich-classpath You can check this recent announcement for a tour of our current capabilities: https://clojurians.slack.com/archives/C0617A8PQ/p1696618492372739 |
Expected behavior
Succesfully jump to java source files
Actual behavior
No symbol found
Steps to reproduce the problem
M-. on a given java symbol like (.toUpperClass)
Environment & Version information
CIDER version information
Lein/Boot version
Lein 2.9.1
Emacs version
Emacs 28.0.50
Operating system
Gentoo
The text was updated successfully, but these errors were encountered: