Skip to content

cider-find-var on java code works every other time in Emacs 28 #2887

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

Closed
andreyorst opened this issue Aug 7, 2020 · 13 comments
Closed

cider-find-var on java code works every other time in Emacs 28 #2887

andreyorst opened this issue Aug 7, 2020 · 13 comments

Comments

@andreyorst
Copy link
Contributor

I was looking why CIDER jumps to the Clojure code without any issues, but can't jump to the Java sources, even if everything seem to be configured correctly. I've read #2819 (I'm unsure if this is the same issue, as I can't repro it in Emacs 26.3 or 27.1-rc2), #2745 also seems a bit different, and still was unable to achieve expected behaviour. Well, this is strange, but I've finally figured out that this is not the issue with my config, and something with CIDER itself. And this is really weird thing.

Here's a zip archive with minimal repro-init.el, and a sample project to test on:
repro.zip

Problem description

cider-find-var pointed at Java code works but only sometimes.

I can't describe it better, but it feels that it's just random.

Steps to reproduce the problem

  • unzip repro.zip -d cider_bug && cd cider_bug
  • emacs -q -l repro-init.el repro/src/repro/core.clj
  • C-c M-j
  • put point on Executors/newFixedThreadPool, and press M-.
  • repeat until it works...

If you lucky, you'll jump to Java sorces. If not, you can restart Emacs, and try again, and some times it works. Here's a recording of me doing this:

https://asciinema.org/a/Es7NsyVlj0yZKyazpOsMvt6LJ

It took me 8 Emacs restarts until it finally did the thing.

Expected behaviour

Consistent jumps to Java source code.

Environment & Version information

CIDER version information

;; CIDER 0.26.0 (package: 20200805.827) (Nesebar), nREPL 0.8.0                  
;; Clojure 1.10.1, Java 1.8.0_262   

Lein/Boot version

Leiningen 2.9.3 on Java 1.8.0_262 OpenJDK 64-Bit Server VM

Emacs version

Tested with:

  • Self compiled GNU Emacs 28.0.50 from feature/native-comp branch - does not work
    Configured using:
    'configure --with-nativecomp --without-pop --prefix=/home/andreyorst/.local/emacs --bindir=/home/andreyorst/.local/bin '--program-transform-name=s/^ctags$/ctags.emacs/''
    
  • Self compiled GNU Emacs 28.0.50 from master branch - does not work
    configuration flags are the same.
  • Emacs 26.3 - works
  • Emacs 27.1-rc2 - also works

Operating system

Fedora 32

@bbatsov
Copy link
Member

bbatsov commented Aug 8, 2020

I rarely test CIDER with Emacs pre-releases, mostly because things there tend to change too dynamically. Recently we had done one change for Eldoc on Emacs 28, then something else got changed and this broke again. Fun times. :-)

@andreyorst
Copy link
Contributor Author

I'm actively using nativecomp branch (https://akrl.sdf.org/gccemacs.html), as it makes everything work much faster, and thus I'm locked inside the most recent Emacs. However this issue doesn't seem to be caused by recent changes, as it didn't work for me from the moment I've started using CIDER, which was several months ago, but I was thinking that this is due to wrong configuration.

@bbatsov
Copy link
Member

bbatsov commented Aug 14, 2020

I'm actively using nativecomp branch (https://akrl.sdf.org/gccemacs.html), as it makes everything work much faster, and thus I'm locked inside the most recent Emacs.

Got it.

However this issue doesn't seem to be caused by recent changes, as it didn't work for me from the moment I've started using CIDER, which was several months ago, but I was thinking that this is due to wrong configuration.

It'd be great if you can send here the nREPL message log from a case when this work and doesn't work for you. I'll check out your repro steps when I can myself, but those logs would definitely be helpful as well.

@andreyorst
Copy link
Contributor Author

will do in a couple of days

@andreyorst
Copy link
Contributor Author

Sorry for the delay (gosh, 20 days already, I've thought only 4 days passed). Here are messages:

does-not-work.txt
work.txt

Repro recipe is still actual, however it seems that now it works more often, though not always.

@stale
Copy link

stale bot commented Dec 4, 2020

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!

@stale stale bot added the stale label Dec 4, 2020
@stale
Copy link

stale bot commented Dec 5, 2020

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!

@andreyorst
Copy link
Contributor Author

andreyorst commented Dec 5, 2020

Nice!

@stale stale bot removed the stale label Dec 5, 2020
@stale
Copy link

stale bot commented Apr 8, 2021

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!

@stale stale bot added stale and removed stale labels Apr 8, 2021
@stale
Copy link

stale bot commented Jul 11, 2021

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!

@stale stale bot added stale and removed stale labels Jul 11, 2021
@andreyorst
Copy link
Contributor Author

Sorry for the delay (gosh, 20 days already, I've thought only 4 days passed). Here are messages:

does-not-work.txt
work.txt

Repro recipe is still actual, however it seems that now it works more often, though not always.

@andreyorst
Copy link
Contributor Author

I've tested this on the 1.2 release and it seems to work now. Closing, thanks!

@bbatsov
Copy link
Member

bbatsov commented Dec 24, 2021

A problem that solves itself - my favorite kind. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants