-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[output][vscode][plugin] Output channels are not cleaned up after closing the channel #8122
Comments
Adding the following code to the registry would solve the issue :
But That would not remove the cache done by the registry just managing it properly ? |
Why do we need to cache it? |
Reading code, it does not seem that the caching is usefull (this.channels is private) so removing the cache and using this.outputChannelManager.getChannel all the time should not be an issue |
Exactly, I do not see any reason for caching here. The |
Can you propose a pull request ? At the moment, I'm cannot provide one. |
The fix is not urgent, it can wait for you ;) Let me know if you're interested in helping us. I can provide you a few pointers for the PR. Otherwise, we will fix this later. |
eclipse-theia#8122 Signed-off-by: Mikael Desharnais <mikael.desharnais@gmail.com>
Just to comment on this, there is one drawback to deleting the cache. |
Correct and this is the expected behavior.
I do not understand this. Hiding a channel is not removal, we just do not show it in the UI.
This is also expected.
Well, we won't break this behavior.
Feel free to propose additional APIs, and we will look into your PR, but we cannot change the |
Ok, if we can't break this behavior, I think we can remove all the if (channel) that clutter the registry and can never be false. |
Instead of keeping an extra cache of channels for VS Code extensions, we delegate the channel manager one via commands. Closes #8122 Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Instead of keeping an extra cache of channels for VS Code extensions, we delegate the channel manager one via commands. Closes #8122 Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Bug Description:
The output channel registry for the extensions (VS Code and Theia plug-in) does its own caching:
theia/packages/plugin-ext/src/main/browser/output-channel-registry-main.ts
Line 93 in 250841d
Disposing the channel on the FE does not update the channel cache for the extensions, and tries to work on a disposed editor model.
Steps to Reproduce:
const c = (theia|vscode).window.createOutputChannel('test-channel'); c.appendLine('running...');
Additional Information
The text was updated successfully, but these errors were encountered: