-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
VS Code 1.81.1 starts *all* onTaskType extensions when debugging #192043
Comments
Any update on this? I'm still encountering this bug using 1.84.2, and it's very overwhelming to have every extension startup all at once (with their associated notifications) when you just want to debug your project :/
|
I am a maintainer of the Go extension. We are observing that the Go extension is activated randomly due to this bug. |
This is an extremely annoying bug. I have the rust-analyzer extension installed, and when I'm working on non-rust projects (e.g., a platformio C++ arduino project), rust-analyzer shows a very urgent red error message at the bottom of my screen. From all the related bugs, it sounds like this is a vscode issue, and extension authors are unable to fix it. |
Seeing this issue as well from within a Swift project. I found this issue via: rust-lang/rust-analyzer#17018 |
I see the issue here. I don't think we ever should've adopted implicit activation for tasks - which means that
Thus, that extension will get activated when the build task command is run for example because in doing that, we call activate task providers, which fires the events for the whole registry. vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Lines 600 to 602 in 842e001
We fire events for the whole registry for that case because tasks (including a build task) are provided in the extension programmatically and we want the execution of the task after user request to be expeditious vs waiting for on-demand extension activation. vscode/src/vscode-dts/vscode.d.ts Lines 8494 to 8505 in bfa1c61
Reverting this should fix it: |
This would also happen when debugging if the configured task for debugging lacks a vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts Lines 792 to 795 in 4e9bc62
|
I have to revert this fix once again because we need to activate all task providing extensions when debugging as otherwise, a Similarly, build tasks can be set programmatically, using the In order to minimize the number of extension activations, we encourage people to set the |
This is unfortunate. Is there an alternative approach to fix this issue? Or is there some capability for tasks that we would have to add to tackle this? |
One idea for the debugging case would be to add a task |
I can repro when I set Currently, when The fix is to wait on activation. If we find a default build task, then its provider will be activated when it's run. If we don't find one, then we'll fall back to the current behavior - activating all providers. |
I think that's good behavior. We might still be able to add some optimization for the case of extension-provided configurations. Maybe in workspace storage we keep a small LRU (say ~5 entries) to associate labels of tasks with the extensions that provide them, to avoid having to activate all extensions all the time if I run some |
Thanks @meganrogge for improving this. I just tried it out and it behaves better for me. Adding verified label |
This issue is to ressurrect #175821 which was fixed, then closed, then reverted without comment.
The issue remains in 1.81.1. Attempting to run any task loads ALL extensions.
For example, for me it loads PlatformIO, Rust Analyzer, etc. when I'm working on a C project.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: