You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using the lemminx-maven jars with vscode-xml, and saw this exception in the output view:
[Error - 09:50:29] Nov 10, 2023 09:50:29 org.eclipse.lemminx.services.XMLHover getTextHover()
Message: While performing IHoverParticipant#onText
java.util.concurrent.CancellationException
at org.eclipse.lsp4j.jsonrpc.CompletableFutures$FutureCancelChecker.checkCanceled(CompletableFutures.java:59)
at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.collectArtifactDescription(MavenHoverParticipant.java:381)
at org.eclipse.lemminx.extensions.maven.participants.hover.MavenHoverParticipant.onText(MavenHoverParticipant.java:153)
at org.eclipse.lemminx.services.XMLHover.getTextHover(XMLHover.java:214)
at org.eclipse.lemminx.services.XMLHover.doHover(XMLHover.java:99)
at org.eclipse.lemminx.services.XMLLanguageService.doHover(XMLLanguageService.java:185)
at org.eclipse.lemminx.XMLTextDocumentService.lambda$hover$5(XMLTextDocumentService.java:281)
at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
The main problem with this strategy is that if one participant throws a cancelled exception it breaks other particpant result. Ex : if lemminx provides hover for XSD documentation and lemminx-maven throws a cancelled exception because some maven component are not loaded, the XSD documentation will not displayed.
Cancelled exception can occur in 2 usecase:
the DOMDocument has changed, so we should stop all participant process
one participant throws a cancelled exception (like lemminx maven) and we should not stop the hover process.
I tried using the lemminx-maven jars with vscode-xml, and saw this exception in the output view:
https://github.com/eclipse/lemminx/blob/d1d67ec09ad8ded638fc7c8ce1f52b72b33b8ec9/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/services/XMLHover.java#L219 should probably re-throw CancellationException and let the client handle the cancelled request
The text was updated successfully, but these errors were encountered: