redhat-developer / redhat-developer/vscode-java

should uninstall bundles when corresponding extension is disabled

Open
#2,993 0 comments 0 reactions 1 assignee View on GitHub

@jdneo is already working on this.

Since Mar 15, 2023.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

When an extension is disabled, the bundle it provides is still loaded, which is unnecessary and may cause some trouble.

E.g.

  • Open a spring-boot project with both Java extension and Spring Boot Tools extension enabled.
  • Wait until everything is ok, now disable Spring Boot Tools extension and reload.
  • Now you'll see below error in server log.
!ENTRY org.springframework.tooling.jdt.ls.extension 4 0 2023-03-08 13:44:21.738
!MESSAGE org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'vscode-spring-boot.ls.start' not found
!STACK 0
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'vscode-spring-boot.ls.start' not found
	at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.JavaClientConnection.executeClientCommand(JavaClientConnection.java:101)
	at org.springframework.tooling.jdt.ls.extension.JdtLsExtensionPlugin.lambda$2(JdtLsExtensionPlugin.java:47)
	at org.springframework.tooling.jdt.ls.commons.BootProjectTracker.fireEvent(BootProjectTracker.java:71)
	at org.springframework.tooling.jdt.ls.commons.BootProjectTracker.processProject(BootProjectTracker.java:59)
	at org.springframework.tooling.jdt.ls.commons.BootProjectTracker.<init>(BootProjectTracker.java:50)
	at org.springframework.tooling.jdt.ls.extension.JdtLsExtensionPlugin.lambda$1(JdtLsExtensionPlugin.java:57)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
	at org.springframework.tooling.jdt.ls.extension.JdtLsExtensionPlugin$1.done(JdtLsExtensionPlugin.java:84)
	at org.eclipse.core.internal.jobs.JobListeners.sendEvent(JobListeners.java:153)
	at org.eclipse.core.internal.jobs.JobListeners.sendEventsAsync(JobListeners.java:140)
	at org.eclipse.core.internal.jobs.JobListeners.waitAndSendEvents(JobListeners.java:80)
	at org.eclipse.core.internal.jobs.JobManager.withWriteLock(JobManager.java:524)
	at org.eclipse.core.internal.jobs.JobManager.endJob(JobManager.java:728)
	at org.eclipse.core.internal.jobs.WorkerPool.endJob(WorkerPool.java:117)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:83)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request workspace/executeClientCommand failed with message: command 'vscode-spring-boot.ls.start' not found
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.