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

Distracting and not helpful error toast in VS on OperationCanceled #17887

Open
vsfeedback opened this issue Oct 16, 2024 · 5 comments · Fixed by #17906
Open

Distracting and not helpful error toast in VS on OperationCanceled #17887

vsfeedback opened this issue Oct 16, 2024 · 5 comments · Fixed by #17906
Labels
Area-VS-Editor VS editor support for F# code, not covered elsewhere Feature Improvement
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Oct 16, 2024

This issue has been moved from a ticket on Developer Community.


I use F# and for instance during refactoring I often get those errors. It just requires extra grabbing the mouse and clicking this away. It is time consuming does not provide any value for anyone. Let me switch this off please.

Image


Original Comments

Feedback Bot on 8/28/2024, 09:00 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Vlad Zarytovskii [MSFT] on 9/11/2024, 01:33 PM:

Feedback Bot on 9/12/2024, 04:08 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@github-actions github-actions bot added this to the Backlog milestone Oct 16, 2024
@0101 0101 changed the title The brown eror bar just hinders my work and is never ever helpful for me. Distracting and not helpful error toast in VS on OperationCanceled Oct 16, 2024
@0101 0101 added Bug Area-VS-Editor VS editor support for F# code, not covered elsewhere labels Oct 16, 2024
@T-Gro
Copy link
Member

T-Gro commented Oct 17, 2024

I think it's two aspects:

  • We have a universal try/catch which sends watson error telemetry on any error. This must exclude cancellation.
  • We do have aggregate wrappers (Task.WhenAll and similar) which leads to getting an AggregateException instead of regular cancellation from our plugin back to VS. The exception must be unwrapped and rethrown, I think at some places we did that already, but likely not in the editor layer.

@vzarytovskii
Copy link
Member

The specific operation (rename) is not in the try block, so it probably needs to be with filtering of OCE and TCE.

@0101
Copy link
Contributor

0101 commented Oct 22, 2024

To be fully correct I think we should not be raising OCE at all in the 6 cases here https://github.com/dotnet/fsharp/blob/315966454bcd4e0ec273fa2ab70bcbc48cdbcb86/vsintegration/src/FSharp.Editor/LanguageService/WorkspaceExtensions.fs

Because VS does not expect us to be canceling anything by ourselves. Hence this pops up here and in telemetry.

But rather as @T-Gro suggested we should raise some custom exception and then handle it everywhere (replacing with some kind of empty result/no-op). Unfortunately exceptions kinda go around the type system so we won't know if we covered all the places and will only find out from telemetry.

Maybe we could replace all our top-level cancellatbleTask builders by some cancellableTaskWithDefault ( ... ) that would handle this.

It sounds a little bit like a job for some asyncResult, but we probably don't want to go there 😄

@0101 0101 linked a pull request Oct 22, 2024 that will close this issue
@0101
Copy link
Contributor

0101 commented Oct 23, 2024

#17906 only solves a subset of this issue.

@0101 0101 reopened this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VS-Editor VS editor support for F# code, not covered elsewhere Feature Improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants