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

Add temporary option to allow suppression of recoverable LSP error toasts #7106

Merged
merged 2 commits into from
May 8, 2024

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented May 7, 2024

Resolves #6977

Add temporary option to suppress LSP recoverable errors until we can resolve the architectural issues causing the failed requests.
Related to #6973, microsoft/vscode-dotnettools#722 and more

Implemented as suggested in microsoft/vscode-languageserver-node#1449 (comment)

Additional notes

  1. VSCode's notification settings intentionally do not allow errors to be suppressed.
  2. Ideally we could look at VSCode's do not disturb settings or notification settings for the extension instead of our own option, but the API for that does not exist.
  3. I considered automatic suppression based duplicate error messages, but unfortunately the data in the exceptions is different enough that there's no simple way to reliably determine if the response error is the 'same' problem. Since this is temporary until we can fix the toasts showing up an option seemed more appropriate.

@dibarbet dibarbet requested a review from a team as a code owner May 7, 2024 23:30
// See also https://github.com/microsoft/vscode-dotnettools/issues/722
// https://github.com/dotnet/vscode-csharp/issues/6973
// https://github.com/microsoft/vscode-languageserver-node/issues/1449
if (languageServerOptions.suppressLspErrorToasts) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔how to know if the error is recoverable LSP error or not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is it just suppressing everything for a temp workaround?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any LSP error that doesn't shut down the server is 'recoverable'. If the server shuts down we'll get error toasts from a different code path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification Settings not respected using C# Extension
2 participants