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

Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms in dotnet/runtime #44912

Closed
jeffhandley opened this issue Nov 19, 2020 · 5 comments
Labels
area-Meta Priority:0 Work that we can't release without
Milestone

Comments

@jeffhandley
Copy link
Member

In .NET 6.0, we will be adding support for new platforms including iOS, Android, macOS, iPadOS, and tvOS. As support for these platforms is enabled, we need to inform the Platform Compatibility Analyzer of which APIs are specific to those platforms and which APIs are unsupported on them.

To accomplish this, we need to apply [SupportedOSPlatform] and [UnsupportedOSPlatform] attributes throughout the .NET Libraries for these platforms.

We also need to ensure the SDK infers the appropriate <SupportedPlatform> items for projects targeting these platforms. This behavior already exists for Blazor apps where <SupportedPlatform Include="browser" /> is inferred.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 19, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@jeffhandley jeffhandley added this to the 6.0.0 milestone Nov 19, 2020
@jeffhandley jeffhandley removed the untriaged New issue has not been triaged by the area owner label Nov 19, 2020
@marek-safar
Copy link
Contributor

Is platform TFM superset of SupportedOSPlatformAttribute or is the expectation to still use it for such libraries?

@jeffhandley jeffhandley added the Priority:0 Work that we can't release without label Nov 19, 2020
@marek-safar marek-safar changed the title Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms Apply [SupportedOSPlatform] and [UnsupportedOSPlatform] annotations for new platforms in dotnet/runtime Nov 27, 2020
@jeffhandley
Copy link
Member Author

Platform TFMs will result in automatic application of the [assembly:SupportedOSPlatform] attribute for the targeted platform. But we'll need to enable checking of our new platforms in the build, and we'll also need to apply attributes for any specific APIs that have platform dependencies.

@joperezr
Copy link
Member

joperezr commented Aug 5, 2021

@buyaa-n @jeffhandley is this one done?

@jeffhandley
Copy link
Member Author

OperatingSystem.IsIOS API is problematic #53084 is still open but it's being tracked individually, so we can close this out.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta Priority:0 Work that we can't release without
Projects
No open projects
Development

No branches or pull requests

4 participants