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
In server code (see InitHandler.java), the status notification is possibly sent before initialize response, that will cause the client never receive the Ready notification.
triggerInitialization(rootPaths);
IntegerprocessId = param.getProcessId();
if (processId != null) {
JavaLanguageServerPlugin.getLanguageServer().setParentProcessId(processId.longValue());
}
try {
Collection<String> bundleList = getInitializationOption(initializationOptions, BUNDLES_KEY, Collection.class);
BundleUtils.loadBundles(bundleList);
} catch (CoreExceptione) {
// The additional plug-ins should not affect the main language server loading.JavaLanguageServerPlugin.logException("Failed to load extension bundles ", e);
}
Firstly, the InitHandler will invoke the function triggerInitialization(rootPaths) to trigger an async job to import the workspace, which will be responsible for sending status notification to client.
Secondly, the InitHandler will invoke the function BundleUtils.loadBundles(bundleList) to load third party bundles.
Finally return Initialize response.
This logic works when BundleUtils.loadBundles(bundleList) run very quickly. But if there are bundles upgrading new version, it will need uninstall the old one, and then install the new one. This operation will take more time. That will possibly cause Ready notification is sent before Initialize response, so that the client never received the correct server status.
The text was updated successfully, but these errors were encountered:
When upgrade java-debug extension and reload the workspace, the language server status is hanging at spin, never be ready.
After an investigation at the initialization logic, i found this is a sequence issue.
Below is the client code.
languageClient.onReady()
is resolved once the client receivedinitialize
response forinitialize
request.In server code (see
InitHandler.java
), the status notification is possibly sent beforeinitialize
response, that will cause the client never receive the Ready notification.triggerInitialization(rootPaths)
to trigger an async job to import the workspace, which will be responsible for sending status notification to client.BundleUtils.loadBundles(bundleList)
to load third party bundles.This logic works when
BundleUtils.loadBundles(bundleList)
run very quickly. But if there are bundles upgrading new version, it will need uninstall the old one, and then install the new one. This operation will take more time. That will possibly causeReady
notification is sent before Initialize response, so that the client never received the correct server status.The text was updated successfully, but these errors were encountered: