-
Notifications
You must be signed in to change notification settings - Fork 29.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
Have a command that clears all problems that are from tasks. #77214
Comments
@alexr00 - it would be great if this command could accept an optional task name parameter, so that users could clear problems from one specific task without clearing problems from all tasks. In complex projects with many different tasks that contribute problems, it's painful to have to re-run every task just to clear out bad problems from one task. Another reason for this is when you quit a background task, there's no way to clear its problems. |
When you quit a background task it's errors should be cleaned up. Passing some parameter to specify which problems to clear seems reasonable. |
@sandy081 there is not a great way to clear only markers from tasks right now since a marker from a task can have the same owner as a marker from someone else. Since the marker What do you think of having a sub-owner for markers or some other property that can be passed into |
Are you going through the public or internal API? |
@sandy081 internal API. |
May be we can change current @jrieken Let me know if you have other suggestions? |
This isn't sooo easy because markers are double-indexed by owner and by resource. So, this will definitely a slow and error-prune approach. @alexr00 Why is it that tasks re-use owners? |
@jrieken it is done so that you don't get duplicate errors from a language server. For example, the typescript language server shows you errors for files you have open. If you have a build task it will create markers for all errors, including the ones that the typescript language server already uses. To prevent this, we use the same owner. |
Yeah, that makes sense. It just won't be super easy to implement because of the way the marker service works today. |
Really hope this gets picked up, +1 |
Rather than stale problems from a task that I've run, stale problems show up most often for me with the Spectral or yamllint extensions that do not always clean up problems, such as the problem
I fix the problems, but the extension does not properly remove the old items. I've reported this via the extension. But until the extensions are fixed, |
Related on Stack Overflow: VS Code Problems tab: Clear items coming from tasks with problemMatcher. |
When a user makes a change to a task and re-runs it, they could end up accumulating problems since the modified task counts as a new task.
One idea is to clear all problems when the task config changes: #76108
But that seems too aggressive and we'd be removing problems without telling the user why.
Instead, having a command to clear the task problems is clearer.
The text was updated successfully, but these errors were encountered: