You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have added ObsoletedInOSPlatform Attribute in 7.0 recently, now need to add the analyzer support for this in PlatformCompatibilityAnalyzer. By the approved API the warnings for obsoleted should have different diagnostic ID, optional message and url properties that should be appended to the existing message. Plus optional message property is added to the UnsupportedOSPlatform attribute which also needs update in the analyzer
Other scenarios/expectations not mentioned in the API Review:
Call sites having ObsoletedInOSPlatform or UnsupportedOSPlatform attributes with greater than or equal version could suppress obsoleted warnings
Same as unsupported attribute diagnostic the obsoleted diagnostics could be guarded with negated OperatingSystem APIs (for example: if (!OperatingSystem.IsLinux())
Also could be guarded with an API that annotated with UnsupportedOSPlatformGuard attribute having matching platform/version, same for negated SupportedOSPlatformGuard
No warning if the obsoleted platform and version is not in the call site supported range. Same as UnsupportedOSPlatform no warning for cross platform build in case the platform is not included in MSBuild SupportedPlatforms list
Warning message structure is same as the existing warnings, user message and/or Url will be appended at the end of each platform/version
MacOS == OSX and iOS is MacCatalyst relations would work same as how it does for unsupported scenarios
Platform Compatibility Analyzer
Diagnostic ID: CA1416
Describe the improvement
We have added ObsoletedInOSPlatform Attribute in 7.0 recently, now need to add the analyzer support for this in PlatformCompatibilityAnalyzer. By the approved API the warnings for obsoleted should have different diagnostic ID, optional message and url properties that should be appended to the existing message. Plus optional message property is added to the
UnsupportedOSPlatform
attribute which also needs update in the analyzerOther scenarios/expectations not mentioned in the API Review:
ObsoletedInOSPlatform
orUnsupportedOSPlatform
attributes with greater than or equal version could suppress obsoleted warningsOperatingSystem
APIs (for example:if (!OperatingSystem.IsLinux()
)UnsupportedOSPlatformGuard
attribute having matching platform/version, same for negatedSupportedOSPlatformGuard
UnsupportedOSPlatform
no warning for cross platform build in case the platform is not included in MSBuild SupportedPlatforms listCC @jeffhandley @terrajobst @rolfbjarne
The text was updated successfully, but these errors were encountered: