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

Clear all problems in the 'Problems' pane with a button #66982

Open
darlanalves opened this issue Jan 23, 2019 · 148 comments
Open

Clear all problems in the 'Problems' pane with a button #66982

darlanalves opened this issue Jan 23, 2019 · 148 comments
Labels
error-list Problems view feature-request Request for new features or functionality languages-diagnostics Source problems reporting
Milestone

Comments

@darlanalves
Copy link

Please add a button in the Problems pane that allows the developer to clear all items in there.

Following discussions from #15524, #29169, #66343 and #50448.

Currently we see problems from different sources (linters, tasks, etc) and they sometimes stay there after the problem or the source file is gone, e.g. problems in an unsaved buffer, in files that were renamed, or files removed when we switch Git branches.

More often than not I have a bunch of problems and the only way to clear that pane is to restart the entire editor.

@vscodebot
Copy link

vscodebot bot commented Jan 23, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@adam-ah
Copy link

adam-ah commented Jan 23, 2019

Please do NOT close this again @sandy081

(FYI @atishpatel @meshula @pmunin)

@sandy081
Copy link
Member

As I mentioned in other issues, this is an issue with those extensions generating problems. They own the lifecycle of problems and they are responsible for clearing them when become stale.

Looks like VS Code has to fix this as extensions are not. So here is my proposal:

  • Problems view by default does not show problems of a file that is not known to VS Code. It means if a file does not exist and is not opened in VS Code, Problems view will filter them.

I am worried to introduce a clear button because this causes repercussions like introducing API changes etc.,

@sandy081 sandy081 added the feature-request Request for new features or functionality label Jan 24, 2019
@sandy081 sandy081 added this to the February milestone Jan 24, 2019
@Gruntfuggly
Copy link

I don't think that will work - for example, my problems are generated from a cmake build running as a task - I wouldn't expect to have to open any files that have compilation errors.

If you would prefer not to add a button, or change the API, maybe just adding a command which destroys the problems window and recreates it would be enough?

@atishpatel
Copy link

atishpatel commented Jan 24, 2019

@sandy081

As I mentioned in other issues, this is an issue with those extensions generating problems.

Yes. The issue is an issue from the extensions. But, adding this simple feature allows the users to have a much better experience.

Problems view by default does not show problems of a file that is not known to VS Code.

The filter probably isn't a great idea. Plus, if you add a filter, there will need to be a way to disable it and it doesn't catch all the cases.

I am worried to introduce a clear button because this causes repercussions like introducing API changes etc.,

Could you please explain more specifically why introducing a clear button would cause issues? The reason I ask is that there might be a difference between what you are imagining and what we are.
I don't think we need to overengineer this. Since the problems list can be repopulated by running the linters again, a clear button (or command) that would clear the problems list shouldn't require much.

With respect 🙏

@eamodio
Copy link
Contributor

eamodio commented Jan 25, 2019

The issue isn't even just about extensions, it is not perfect problem matchers as well (and for some cases, e.g. webpack it isn't even possible to get a PM that works in all cases) -- so having a clear would be a great addition imo.

@adam-ah
Copy link

adam-ah commented Jan 25, 2019

Problems view by default does not show problems of a file that is not known to VS Code. It means if a file does not exist and is not opened in VS Code, Problems view will filter them.

I don't agree with this. The lingering errors aren't always about files that have been deleted since the last check. Sometimes the extension doesn't get executed again so the results are stale, etc. etc.

Perhaps the clear could be a forced re-run of the extension? I'm not sure if this is a good idea, thoughts?

@meshula
Copy link

meshula commented Jan 25, 2019

If there are "magic" extensions that the Problems pane is expected to interact with in a special way, and "non-magic" operations such as output from linters that are not deeply aware of VSCode architecture that cause the Problems pane to irrevocably and incrementally fill with garbage, perhaps there's a fundamental design problem here, and the "non-magic" operations need to yield be routed to a new, less opinionated panel with a Clear button.

@sandy081
Copy link
Member

sandy081 commented Jan 30, 2019

Clearing problems is not as straight forward as it is. @dbaeumer mentioned why exactly it is here

In VS Code problem model problems are owned by the one creating them. An extension could therefore always only apply the delta (e.g.remove one and add another one) instead of always computing all errors and pushing them into the model (the task system by the way does some delta optimizations as well). So if a user clears all problems he might miss out on new problems even if he changes files since the extension computing them might still think old problems are present (for example during incremental builds).

So, this needs introducing API(s) for changing problems and this has to be adopted by the problems owners.

@sandy081 sandy081 modified the milestones: February 2019, Backlog Jan 30, 2019
@sandy081 sandy081 added the languages-diagnostics Source problems reporting label Jan 30, 2019
@adam-ah
Copy link

adam-ah commented Jan 30, 2019

I don't understand @sandy081 , the ones we are clearing are the ones we never want to see again; the extension has long forgotten about them, that's why they are getting stuck.

since the extension computing them might still think old problems are present

The extension doesn't think anything at this point, the stale items have been forgotten about, the deltas are not reflecting them any more. What's wrong with removing the stale items that the extension isn't maintaining any more?

So if a user clears all problems he might miss out on new problems

If the extension is sending deltas, this is actually impossible as new problems will be added to deltas. How could we miss new items?

@atishpatel
Copy link

@sandy081
Ah, thank you for quoting that. It helps us understand and focus on potential solutions.

A couple of questions:

  1. As adam-ah said, why wouldn't extension know the deltas is all problems? Are the deltas stored by the extensions instead of by vscode?
  2. One option is to introduce an API change that notifies the extensions, but there are other options. I'm currently solving the problem by using the "Reload window" command. What if the button cleared the list AND restart extensions that contributed to the problems list? This would allow for no delta issues and in turn, no missing out on problems. Is there a reason why this can't be done or why the solution is bad?

@sandy081
Copy link
Member

sandy081 commented Feb 1, 2019

@adam-ah If a clear action is introduced, then it cannot be specific/scoped to stale problems. A stale problem can be anything in the given context. It can be from the deleted file, or from a task which did not update on fixing the problem. My point is that, clear action cannot be half complete and it should work for all problems including those which behave correctly. It means that extensions that are playing well and smart (incremental) should be aware of problems being removed.

If the extension is sending deltas, this is actually impossible as new problems will be added to deltas. How could we miss new items?

It is not just about missing it is also VS Code and extensions will be out of sync. This is not a good design and is error prone.

What if the button cleared the list AND restart extensions that contributed to the problems list? This would allow for no delta issues and in turn, no missing out on problems. Is there a reason why this can't be done or why the solution is bad?

It is not good to restart an extension to just reset the problems. An extension can be contributing more in addition to problems. This should be called restart extension instead of clear problems 😄 . Anyways restarting a running extension without window reload is not possible due to code loading and unloading. This is a separate topic and let's not deviate. If clear button is needed, it has to be done the right way with API.

@atishpatel
Copy link

Hahaha 😆 Yeah, it's not an ideal solution, but it's about what I do to solve it currently with "Reload window". :)

So, where do we stand? There have been 5 issues opened with multiple people commenting and the proposed filter solution won't work in many cases. What more would it take to decide if a proper solution with an API change should be implemented? Or should we just live with the reload window?

@sandy081
Copy link
Member

sandy081 commented Feb 5, 2019

If clear button is what it is needed, then we need to take the right path.

@jxbetancourt
Copy link

Facing this now with Git History plugin. When I view a git history, issues appear in Problem view. And, no way to clear these. A Clear button would be nice. Most IDEs do this.

@Gruntfuggly
Copy link

A good example of why this is needed - I currently have 5 problems coming from vscode's settings.json file which is no longer open, meaning I'll need to reload the window to clear them.

If vscode can't clear up it's own problems, how can it reasonably expect extensions to do it?

@sandy081
Copy link
Member

@Gruntfuggly It is a bug, can you please file a separate issue providing steps to repro.

@Gruntfuggly
Copy link

I've raised one, but the bug isn't really the issue...

@adam-ah
Copy link

adam-ah commented Mar 4, 2019

Any update on this one?
It appears that users say we need a clear button, but @sandy081 says "we need to take the right path".
What is the right path and when could we get this released?

@sandy081
Copy link
Member

sandy081 commented Mar 5, 2019

Right path is to introduce an API for problems removal and let the extensions to adopt to it. As of release, not yet planned.

@meshula
Copy link

meshula commented Mar 5, 2019

Nothing wrong with an API, but it doesn't make sense to not have a Clear button. I think as users we are concerned with practical aspects of usage, i.e. having a window not cluttered with useless junk, rather than semantic correctness on the part of extension authors we have no control over.

@0xorial
Copy link

0xorial commented Mar 11, 2019

Can't wait for appropriate API to come. For now, I've implemented a whole separate extension to run webpack and show errors in a separate treeview, which is such an overkill...

@burtonrodman
Copy link

@Parwaztech first you should know i’m not affiliated with Microsoft, but a long time user of vscode.

as I doubt you’ve read the hundreds of comments, the tldr is that this is not a simple problem and minimizing the issue isn’t going to solve it.

@Parwaztech
Copy link

@Parwaztech first you should know i’m not affiliated with Microsoft, but a long time user of vscode.

as I doubt you’ve read the hundreds of comments, the tldr is that this is not a simple problem and minimizing the issue isn’t going to solve it.

Sure, its a big issue thus its very important for developers. I am sure Microsoft can tackle this on their own or with peers. :) Its all about priority. @msftdata @msftgits @csigs or any Microsoft concern executive team who is seeing this by any chance...

@HFTrader
Copy link

Bump. I also need this.

@vdilecce
Copy link

vdilecce commented Sep 22, 2023

Extension C/C++ provides command C_Cpp.RemoveAllCodeAnalysisProblems that seems to to exactly this with respect to Code Analysis (clang-tidy) problems. Maybe a command with a similar implementation could be provided by VSCode?

@Peeja
Copy link

Peeja commented Sep 25, 2023

I'm confused by this thread. I hear the maintainers saying that this is the extensions' responsibility. But not every problem is created by an extension. I wrote a task by hand in tasks.json which has generated some problems. There doesn't seem to be any way to make those problems disappear now without reloading the window. That seems like an incomplete feature to me.

I don't necessarily need a nuclear "Clear all problems" button. I just don't understand how this is supposed to ever work usefully. Can my task make the problems which it itself generated disappear somehow? I'm not seeing a way to.

@HFTrader
Copy link

HFTrader commented Sep 25, 2023

I gave up on that useless window, and I'm just running watch 'ninja 2>&1 | head -n50' on a terminal outside vscode. The C++ Intellisense just does not clear. You can never be sure that the message there is old or current.

@bobmagicii
Copy link

bobmagicii commented Oct 19, 2023

on a terminal outside vscode

why not the terminal pane that can take the same space the problems pane used to take? meme it hard about how unhelpful the dedicated tool is.

@HFTrader
Copy link

why not the terminal pane that can take the same space the problems pane used to take?

That's only marginally better, if at all. Actually, it is easier to alt-TAB into an external terminal than to navigate the shortcuts (or use the mouse) to get into the built-in terminal, which is a mess on itself.

@Peeja
Copy link

Peeja commented Oct 25, 2023

@HFTrader FWIW, the default binding to go to the terminal is Ctrl-`. No shade for preferring your terminal outside the editor, but it's not hard to get to by keyboard.

@bobmagicii
Copy link

bobmagicii commented Dec 9, 2023

for the past while now i had been wondering if we were all just taking the piss on a thread nobody at microsoft knows exists and was fixed a while ago, because it has not happened in a long time here and this year i've done more coding than the previous.

and then today just now for the first time in 2023 the default css tools got a stuck problem in that pane about a semi-colon it was angry about. nothing would make it go away. it wasn't even a line number that existed in the file anymore, as the file got shorter.

sigh ctrl+shift+p, "reload"

which is a double pain in the arse because im using the remote dev stuff so its a full state wipe and connection reconnect, one being suffered just to sanity check the problems pane against what i think of the file. so now i lost my up arrow history in that terminal from the reload, and like now im really feeling that burn in the tips of the ears right.

can we just have a button?

@jacobfriedman
Copy link

jacobfriedman commented Dec 9, 2023 via email

@jfines
Copy link

jfines commented Jan 12, 2024

Its still a problem (pun intended).

My knee jerk rxn was that there should be a way to "refresh" the problem pane thus forcing whatever put it/them there to re-evaluate the sitch and not post the problem/s again if they aren't relevant. Nevertheless it isn't gonna fix my "problems" right now and it's holding up progress.

@aviden
Copy link

aviden commented Mar 2, 2024

+1 to the request
Why am I not surprised to see that this was requested 5 years ago and the VSCode team just keeps ignoring it? 🤦‍♂️

@alichang-talos
Copy link

+1 to the request Why am I not surprised to see that this was requested 5 years ago and the VSCode team just keeps ignoring it? 🤦‍♂️

Ha, I just swung by see if there was any resolution for this yet, or if anyone came up with any hacks or workarounds.

@ShonFrazier
Copy link

I'm thoroughly amazed at the reaction by vscode developers. I'm surprised UX isn't higher on the list of priorities.

@bobmagicii
Copy link

bobmagicii commented Mar 29, 2024

I'm thoroughly amazed at the reaction by vscode developers. I'm surprised UX isn't higher on the list of priorities.

historically microsoft goes through this sine wave regarding how serious they take the open source stuff it seems like we might be starting a fall from the apex of max ignore. ux being sidelined should not be too surprising looking at the current microsoft library like w11. sometimes i wonder if vscode getting popular was too much of a surprise, since the marketplace is also half baked - only just this week after 7 years they posted a paper about how when you let a user upload a file, you should let them delete that file later. (developers publishing plugins for vscode)

@NSExceptional
Copy link
Contributor

only just this week after 7 years they posted a paper about how when you let a user upload a file, you should let them delete that file later. (developers publishing plugins for vscode)

Lmao, can you link to said paper @bobmagicii?

@bobmagicii
Copy link

bobmagicii commented Mar 29, 2024

Lmao, can you link to said paper @bobmagicii?

microsoft/vsmarketplace#875 this md file they are collabing on.

@mpstaton
Copy link

mpstaton commented Sep 8, 2024

+1 to the request. It's infuriating.

@dirkesquire
Copy link

I'm writing some C# Code. There were a lot of problems with a particular file.
I comment out the offending code. However the problems remain.
How do I 'clear' the problems or at least restart the process that created all the problems? I've got 69 problems in the Pane and they are out of date, since if you click on them it takes you to commented out code.
I tried '.NET Restart Language Server' but it did not help.
Do I have to quit and restart VS Code to get rid of them?

@caner-cetin
Copy link

5 years

@ShonFrazier
Copy link

It’s a real testament to the care and attention to user experience provided by Microsoft

@MihaelIsaev
Copy link

MihaelIsaev commented Sep 24, 2024

Also faced with stuck problems in TS project and "Reload Window" doesn't help at all. 5 years for a simple UX fix, what a shame...

@gjsjohnmurray
Copy link
Contributor

@MihaelIsaev did you try TypeScript: Restart TS Server

@MihaelIsaev
Copy link

@gjsjohnmurray thank you for the suggestion, unfortunately, restarting the TS server doesn’t seem to resolve the issue either

Screen.Recording.2024-09-24.mp4

@jacobfriedman
Copy link

5 years

and two weeks...

@jacobfriedman
Copy link

This isn't stale. But it is 3+ years old.

On Fri., Dec. 8, 2023, 8:09 p.m. Bob Magic II, @.> wrote: for the past while now i had been wondering if we were all just taking the piss on a thread nobody at microsoft knows exists and was fixed a while ago, because it has not happened in a long time here and this year i've done more coding than the previous. and then today just now for the first time in 2023 the default css tools got a stuck problem in that pane about a semi-colon it was angry about. nothing would make it go away. it wasn't even a line number that existed in the file anymore, as the file got shorter. sigh ctrl+shift+p, "reload" — Reply to this email directly, view it on GitHub <#66982 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFKHXSL3H5D2WIGYV5VZ4TYIPB5XAVCNFSM4GR2Q642U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBUHAYDSMBQGM3A . You are receiving this because you commented.Message ID: @.>

Aging like fine cheese

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-list Problems view feature-request Request for new features or functionality languages-diagnostics Source problems reporting
Projects
None yet
Development

No branches or pull requests