Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

didOpen events are missing for newly opened documents after reconnection #4085

Closed
akosyakov opened this issue Jan 16, 2019 · 3 comments
Closed
Assignees
Labels
bug bugs found in the application lsp language server protocol

Comments

@akosyakov
Copy link
Member

akosyakov commented Jan 16, 2019

We've switched from multiple language clients to one per a language to avoid leaking them: #3538 (comment)

It's turned out that on stop language client disposes document listeners but not unset them, and on following start it does not install new listeners, so all document events are missing. And there is no language support at all.

In order to reproduce:

  • restart ts language server
  • open ts file
  • now language support, but should be
@akosyakov akosyakov added bug bugs found in the application lsp language server protocol labels Jan 16, 2019
@akosyakov akosyakov self-assigned this Jan 16, 2019
@akosyakov
Copy link
Member Author

It was fixed in vscode-languageclient: microsoft/vscode-languageserver-node@82a75b4

But we cannot use it, without upgrading our vscode-languageclient, monaco-languageclient and then Theia.

I will work it around for now. We can remove it after upgrading dependencies.

@kittaakos
Copy link
Contributor

@akosyakov, if this was closed why do we still have the patching code here:

/**
* see https://github.com/eclipse-theia/theia/issues/4085
* remove when monaco-languageclient is upgraded to latest vscode-languageclient
*/
protected patch4085(client: MonacoLanguageClient): MonacoLanguageClient {
const features = client['_dynamicFeatures'] as Map<string, {
_listener?: Object | undefined
dispose?: Function
}>;
for (const feature of features.values()) {
if (feature.dispose) {
const dispose = feature.dispose.bind(feature);
feature.dispose = () => {
dispose();
if (feature._listener) {
feature._listener = undefined;
}
};
}
}
return client;
}

Thanks!

@akosyakov
Copy link
Member Author

@kittaakos It was fixed by a workaround. Opened an issue to investigate whether it is possible to remove a patch: #6224. We should generally check whether there is memory leaks with new vscode languageclient. I've overlooked it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application lsp language server protocol
Projects
None yet
Development

No branches or pull requests

2 participants