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 request for one language server definition misses a definition that matches the file asynchronously #1913
LanguageServiceAccessor.getLanguageServers(psiFile, beforeStartingServerFilter, afterStartingServerFilter, serverDefinition) gives no language server for a definition that matches the file only through a mapping that is matched asynchronously (shouldBeMatchedAsynchronously).
How it happens
When it is given a definition, getMatchedLanguageServersWrappers checks it against mappings.getMatched(), the synchronous matches, and returns nothing if it isn't among them:
if (matchServerDefinition != null) {
if (!serverDefinitions.contains(matchServerDefinition)) {
returnCompletableFuture.completedFuture(Collections.emptyList());
}
The asynchronous matches, mappings.getAsyncMatched(), are looked at only after that, so a definition that is matched only asynchronously never gets that far.
sendDidOpenAndRefreshEditorFeatureFor asks for the open files of a definition this way, as after a restart of the definition. So an open file that a definition matches asynchronously gets no didOpen and no refresh of its editor features from it then, until another request connects it. #1911 asks this way too, for an open file that moved as its instance was chosen.
Possible fix
When a definition is given and isn't among the synchronous matches, wait for the asynchronous matches, and keep the definition if it is among them, as the request without a definition does.
Activity
fix: let a request for one definition match the file asynchronously
fix: let a request for one definition match the file asynchronously (r…