-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
java completer reports errors on clean workspace until any dummy change made #4224
Comments
I can repro this, but as far as I can tell it's the fault of JDT itself. It actually reports diagnostics the way you are seeing them. YCM is just relaying those errors from JDT to vim's UI. I also got a warning that JRE 17 is not found and that JRE 21 will be used, but that's expected on my machine. Here's the list of exchanged messages between YCM and JDT:
I really do not see how this could be YCM's fault, but maybe @puremourning sees something I'm missing? |
@bstaletic thank you for looking into this. Indeed I have tested with coc-java too and the same issue reproduced. Do you have any advices on how to report the issue to JDT.LS team? I suppose they may not be happy with end user testcase bound to particular editor. |
The key part are the messages exchanged between JDT.LS and tge client. Turn on debug logging, as I have suggested in my previous comment. Then look at the That should be fine for a JDT bug report. |
I'll close this, as this was never YCM's fault, but JDT's. |
Issue Prelude
Frequently Asked Questions section.
about to report and couldn't find an answer to my problem. (Example Google
search.)
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, using
vim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what Iexpected to happen and what actually happened.
that any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
Screencast
Sample java project attached. There are three java files:
When Main.java opened in clean workspace and java completer initialized there are errors about unresolved UnusedObjectHelper type. But if I make any nonsensical change errors are gone.
Sample project: ycm.demo.tar.gz
vim -Nu NONE --cmd 'set filetype=java' --cmd 'packadd YouCompleteMe' ./src/main/java/ycm/demo/Main.java
There should be no "cannot be resolved to a type" errors
Errors shown until any change made
Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Output of
YcmDiags
firstly after initialization
then after any change
Output of
git rev-parse HEAD
in YouCompleteMe installation directoryContents of YCM, ycmd and completion engine logfiles
gist
OS version, distribution, etc.
Ubuntu 22.04.4 LTS
The text was updated successfully, but these errors were encountered: