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

Annotate platform-specific implementation assemblies with [SupportedOSPlatform] #41901

Closed
jeffhandley opened this issue Sep 4, 2020 · 1 comment · Fixed by #43097
Closed

Comments

@jeffhandley
Copy link
Member

With the introduction of the Platform Compatibility Analyzer and the supporting attributes, we can now mark APIs or assemblies as platform-specific. The analyzer will flag any platform-neutral code that calls into platform-specific code and produce warnings. PR #41760 enabled the analyzer in the runtime repo and it addressed the warnings introduced.

Some of the warnings surfaced in platform-specific implementation assemblies and we suppressed they by using Debug.Assert statements. Ideally, our platform-specific implementation assemblies would be marked with [SupportedOSPlatform] attributes to indicate the specific platform for that assembly. However, we need to be careful not to let those platform-specific attributes get propagated into the corresponding reference assemblies.

This topic came up here: #41760 (comment). We previously had a rough draft attempt of applying the attributes automatically based on the TFM in #41209. We weren't confident in the approach though, so we chose to proceed with #41760 as-is and file this issue for a follow-up investigation to see if there's a better way to accomplish this through assembly-level attributes.

/cc @terrajobst

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 4, 2020
@ghost
Copy link

ghost commented Sep 4, 2020

Tagging subscribers to this area: @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

@safern safern removed the untriaged New issue has not been triaged by the area owner label Sep 4, 2020
@safern safern added this to the 6.0.0 milestone Sep 4, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants