We've switched from multiple language clients to one per a language to avoid leaking them: https://github.com/theia-ide/theia/pull/3538#issuecomment-442889603
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:
It was fixed in vscode-languageclient: https://github.com/Microsoft/vscode-languageserver-node/commit/82a75b48805170bf15821a34b19b780dae9cd3df
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.
@akosyakov, if this was closed why do we still have the patching code here:
https://github.com/eclipse-theia/theia/blob/24f77b359e20ff717dd54ade701abd6818a9a796/packages/languages/src/browser/language-client-factory.ts#L83-L104
Thanks!
@kittaakos It was fixed by a workaround. Opened an issue to investigate whether it is possible to remove a patch: https://github.com/eclipse-theia/theia/issues/6224. We should generally check whether there is memory leaks with new vscode languageclient. I've overlooked it.