Improve de-duping of project load failure toasts #69455
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I discovered that the de-duping on the vscode side of notifications is not quite good enough for this scenario. While vscode does only show a max of 3 notifications at once - if the projects load slowly enough the 3 toasts will keep getting replaced by new ones after they are dismissed.
Instead, we now only show 1 toast for a single call to sln/projects loading no matter how many load failures there are. The logs will still contain the full list load failures. Additionally, we do not wait for all the projects to load to show a failure as that can take some time. We always display the first error we hit.
e.g. in roslyn you can see there are many project load failures. We end up showing just the first one we find.