Skip to content

Remove #pragma suppressions from EditorFeatures.Cocoa#56974

Merged
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:CocoaCleanup
Oct 14, 2021
Merged

Remove #pragma suppressions from EditorFeatures.Cocoa#56974
davidwengier merged 1 commit intodotnet:mainfrom
davidwengier:CocoaCleanup

Conversation

@davidwengier
Copy link
Member

Fixes #48871

Just a few random ups that hadn't been cleaned.

@davidwengier davidwengier requested a review from a team as a code owner October 6, 2021 10:18
@davidwengier davidwengier requested a review from a team October 6, 2021 10:18
@ghost ghost added the Area-IDE label Oct 6, 2021
@davidwengier davidwengier changed the title Remove #pragma suppressions Remove #pragma suppressions from EditorFeatures.Cocoa Oct 6, 2021
@davidwengier davidwengier requested review from a team and Therzok and removed request for a team October 12, 2021 01:30
@davidwengier
Copy link
Member Author

Ping @dotnet/roslyn-ide

{
await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

#pragma warning disable CA2007 // Consider calling ConfigureAwait on the awaited task (containing method uses JTF)
Copy link
Contributor

Choose a reason for hiding this comment

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

This was an intentional suppression. CA2007 does not make sense in the current context, and the standard practice for this context is to implicitly use ConfigureAwait(true).

else
{
textView = _diffViewer.InlineView;
#pragma warning disable CA2007 // Consider calling ConfigureAwait on the awaited task (containing method uses JTF)
Copy link
Contributor

@sharwell sharwell Oct 14, 2021

Choose a reason for hiding this comment

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

I would prefer the changes in this file be reverted. I like the idea that we should be visually penalized for failing to follow a standard practice designed to maximize readability.

The other files seem fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I understand what you're saying Sam, but I checked and .ConfigureAwait(true) is used in Roslyn 209 times, compared to suppression only 19 times, so I'm keeping with what seems standard in this repo. I don't agree that making things worse because they can't be perfect is the right way to go, but I don't feel strongly about this case and wouldn't block if you wanted to remove all of the .ConfigureAwait(true) calls in the repo and implement a new standard.

Mainly I just don't want to run the integration test gauntlet because I'm not having much luck with them at the moment :)

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

Assuming the VS for Mac folks are OK with it, :shipit:.

@davidwengier davidwengier merged commit bf13f6c into dotnet:main Oct 14, 2021
@davidwengier davidwengier deleted the CocoaCleanup branch October 14, 2021 20:33
@ghost ghost added this to the Next milestone Oct 14, 2021
@RikkiGibson RikkiGibson modified the milestones: Next, 17.1.P1 Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove warning suppressions from EditorFeatures.Cocoa project

7 participants