Skip to content

Disable the Platform Compat Analyzer until #41354 is fixed - #41367

Merged
1 commit merged into
dotnet:masterfrom
jeffhandley:disable-platform-compat-analyzer
Aug 26, 2020
Merged

1 commit merged into
dotnet:masterfrom
jeffhandley:disable-platform-compat-analyzer

Conversation

@jeffhandley

Copy link
Copy Markdown
Member

We intend to merge the Platform Compatibility Analyzer into the .NET 5.0 RC1 SDK. When the updated version of the NetAnalyzers package is taken into the dotnet/runtime repo that contains this analyzer, it will introduce build warnings. Those build warnings surface because:

  • The Runtime repo applies [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes to many APIs now
  • We began applying those attributes before having the analyzer merged in because we wanted to have those attributes in place for the RC1 release
  • There are cases, specifically around our multi-targeting, where we will need to either apply further annotations or utilize guard methods around calls to the platform-specific APIs

Because these warnings will occur, we are going to disable the analyzer in the dotnet/runtime repo before merging it into the SDK. Before we ship .NET 5.0 RC2 though, we want to re-enable the analyzer and address all of the warnings introduced. #41354 tracks that work.

@jeffhandley jeffhandley added this to the 5.0.0 milestone Aug 26, 2020

@buyaa-n buyaa-n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ghost

ghost commented Aug 26, 2020

Copy link
Copy Markdown

Hello @jeffhandley!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@jeffhandley

Copy link
Copy Markdown
Member Author

@safern Do you see any reason to port this into release/5.0? So long as we don't update the NetAnalyzers package version in that branch, the new analyzer won't be applied.

@safern

safern commented Aug 26, 2020

Copy link
Copy Markdown
Member

@jeffhandley I would say let's not port it and if for some reason we need to update the analyzer's package into release/5.0 branch then we can disable this rule as part of that PR.

@ghost
ghost merged commit def5b48 into dotnet:master Aug 26, 2020
@jeffhandley
jeffhandley deleted the disable-platform-compat-analyzer branch August 26, 2020 04:17
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants