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

Consider marking net5.0 obsoleted APIs obsolete in downlevel targets for OOB packages #43484

Closed
jeffhandley opened this issue Jul 18, 2020 · 3 comments
Assignees
Milestone

Comments

@jeffhandley
Copy link
Member

Many APIs are being obsoleted in .NET 5. During the PR review for marking those obsoletions, the question was raised for whether or not we should apply the obsoletions to OOB packages with downlevel targets such as netstandard2.0 and netcoreapp2.0.

This was an explicit non-goal of better obsoletions, but it's worth further consideration.

If we determine that we should indeed apply the obsoletions to downlevel targets, then we would need to:

  1. Extract the list of downlevel-targeted APIs from the obsoletions in .NET 5
  2. Decide if we want to apply a downlevel [Obsolete] attribute without the DiagnosticId/UrlFormat properties, apply an [Obsolete] attribute without those properties (triggering CS0618), or implement compiler support for internally-defined System.Obsolete attributes with the new properties.
@terrajobst terrajobst transferred this issue from dotnet/designs Oct 16, 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.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Oct 16, 2020
@stephentoub
Copy link
Member

stephentoub commented Oct 16, 2020

Extract the list of downlevel-targeted APIs from the obsoletions in .NET 5

This is specifically referring to APIs we actively ship from dotnet/runtime in nuget packages that have downlevel assets? I'd expect the list of obsoletions there to be very small (or empty?). Do you have some examples?

@jeffhandley jeffhandley self-assigned this Jan 8, 2021
@jeffhandley jeffhandley removed the untriaged New issue has not been triaged by the area owner label Jan 8, 2021
@jeffhandley jeffhandley added this to the 6.0.0 milestone Jan 8, 2021
@jeffhandley
Copy link
Member Author

As part of #51721, I reviewed the APIs that were conditionally obsoleted only in net5.0+, and the set was limited to System.Security.Permissions and System.Reflection.MetadataLoadContext. The value of obsoleting these down-level is low and it would introduce possible breaking changes upstack. Those obsoletions will not be applied down-level.

With #51595 though, the obsoletion documentation now makes it clearer and easier to obsolete APIs down-level going forward.

@ghost ghost locked as resolved and limited conversation to collaborators May 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

4 participants