Skip to content
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

Code completion broken with IntelliCode #1213

Closed
jvalkeal opened this issue Dec 23, 2019 · 22 comments
Closed

Code completion broken with IntelliCode #1213

jvalkeal opened this issue Dec 23, 2019 · 22 comments
Assignees
Labels

Comments

@jvalkeal
Copy link

Looks like latest release 0.55.0 broke server side snippets / code completions

Environment

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.15.0-70-generic
redhat.java: 0.55.0

Steps To Reproduce

Create empty MyClass.java file and type class to get basic package/class snippet to. This error is then logged in Language Support for Java output:

[Error - 10:53:29] 23-Dec-2019 10:53:29 Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
java.lang.NoSuchMethodError: org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.initializeRequestor(CompletionProvider.java:133)
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.computeContentAssist(CompletionProvider.java:89)
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.provideCompletionItems(CompletionProvider.java:60)
	at com.microsoft.jdtls.intellicode.core.CommandHandler.executeCommand(CommandHandler.java:57)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$3(JDTLanguageServer.java:472)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$48(JDTLanguageServer.java:963)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

[Error - 10:53:29] 23-Dec-2019 10:53:29 Error in calling delegate command handler
org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
java.lang.NoSuchMethodError: org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.initializeRequestor(CompletionProvider.java:133)
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.computeContentAssist(CompletionProvider.java:89)
	at com.microsoft.jdtls.intellicode.core.CompletionProvider.provideCompletionItems(CompletionProvider.java:60)
	at com.microsoft.jdtls.intellicode.core.CommandHandler.executeCommand(CommandHandler.java:57)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$3(JDTLanguageServer.java:472)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$48(JDTLanguageServer.java:963)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Now I just wonder if this issue is coming from other plugin which hooks to jdt as I'm not that familiar with how that part works.

@LaughingVzr
Copy link

LaughingVzr commented Dec 23, 2019

yes,I have got the same problem. waitng for response.

@jvalkeal
Copy link
Author

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

@LaughingVzr
Copy link

LaughingVzr commented Dec 23, 2019

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

Right,so if disable it , only use redhat plugin for this work. but it seem like not other influence.

@arekgotfryd
Copy link

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

That works for me

@jrobi001
Copy link

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

Thanks! Works for me, was wondering why the snippets stopped working 10-15s after opening a project today

@fbricon fbricon changed the title Server side snippets broken Code completion broken with IntelliCode Dec 23, 2019
@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

@testforstephen @akaroml I'm surprised QA didn't catch that one

@Tazaf
Copy link

Tazaf commented Dec 23, 2019

Got the same issue, but decided to install the previous vscode-java version (0.54.2) instead of completly disabling IntelliCode (that is until this behavior is fixed by either one of the extensions)

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

Weird, I can't reproduce the issue. Can you guys try to call the "Clean the Java language server workspace" command? (F1)

@jrobi001
Copy link

Not sure if this helps: my snippets disappear locally, I uninstalled vscode and extensions fully, then only installed the java pack and the issue remained. (before finding this).

not sure all snippets disappear, but class and sysout do for me, attached is a screenshot showing the snippets provided with intellicode disabled and enabled:
dissaperingsnippets

@fbricon fbricon self-assigned this Dec 23, 2019
@fbricon fbricon added the bug label Dec 23, 2019
@jvalkeal
Copy link
Author

jvalkeal commented Dec 23, 2019

Well yes vscjava.vscode-java-pack contains VisualStudioExptTeam.vscodeintellicode, version 1.2.2 which errors and prevents server side completion. Proper snippets defined in an extension naturally work. I did workspace reload few times before started to look deeper. Also re-enabling intellicode anyway asks you to reload.

@jvalkeal
Copy link
Author

jvalkeal commented Dec 23, 2019

@fbricon Removed my comment that it'd work on insiders, same issue after I fully restarted it.

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

Fix is on its way (eclipse-jdtls/eclipse.jdt.ls#1313)

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

Can you guys please try to install https://download.jboss.org/jbosstools/jdt.ls/staging/java-0.55.1-1983.vsix?

@moritzreiter
Copy link

@fbricon, I had the same problem and after installing the VSIX from your link, IntelliSense completion works fine again for me! 😊

@arekgotfryd
Copy link

Works fine for me as well

@fbricon
Copy link
Collaborator

fbricon commented Dec 23, 2019

Ok thanks for checking. 0.55.1 is being rolled out on the VS Code Marketplace. Should be available in the next few minutes.

@fbricon fbricon closed this as completed Dec 23, 2019
@Tazaf
Copy link

Tazaf commented Dec 23, 2019

Thanks @fbricon ! I can confirm that this fix resolves the issue on my end also.
The reactivity is very much appreciated 👍

@jvalkeal
Copy link
Author

Thanks a bunch for a super quick fix!

@LaughingVzr
Copy link

fix quick,good job!

@testforstephen
Copy link
Collaborator

@testforstephen @akaroml I'm surprised QA didn't catch that one

Thanks to point it out. Currently the compatibility for the third party extensions are not well covered, i will update the test plan for this part.

@akaroml
Copy link
Contributor

akaroml commented Jan 9, 2020

@testforstephen @akaroml I'm surprised QA didn't catch that one

I was surprised too and sorry about that. As a follow-up, we'll:

  1. Add integration tests by installing Java Extension Pack instead of just vscode-java
  2. Make the test plan public so all parties can comment

@jdneo will be on this.

@jdneo
Copy link
Collaborator

jdneo commented Jan 9, 2020

Tracking issue: microsoft/vscode-java-pack#289

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

No branches or pull requests

10 participants