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
{{ message }}
Repository navigation
A document matcher whose async match fails takes away every language server of the file #2161
A language server definition can match files asynchronously, through a DocumentMatcher whose matchAsync returns a CompletableFuture<Boolean>.
LanguageServiceAccessor.getMatchedLanguageServerDefinitions waits for every such matcher of a file in one CompletableFuture.allOf(...), with no error handling. So when one matcher's future fails (its matchAsync throws inside the future, or completes it exceptionally), the whole async match fails.
getMatchedLanguageServersWrappers then fails too: the language servers that matched the file synchronously are lost along with the async ones, and the file gets no LSP feature at all.
So a bug in one plugin's matcher takes away the language servers of every other plugin, and every user-defined one, for that file.
This is the same pattern as #2158, which is about a language server that fails to start.
Expected
A matcher that fails counts as "no match" for its definition, and its failure is logged with the definition's name. The other definitions, synchronous and asynchronous, still match. A cancellation is ignored, as elsewhere.
Activity
fix: a document matcher whose async match fails no longer takes away …