-
Notifications
You must be signed in to change notification settings - Fork 564
Closed
Milestone
Description
Context: #6349
Context: dotnet/runtime#47601
Imagine Android adds a new overload of a method and deprecates the existing method:
[SupportedOSPlatformAttribute ("android33.0")]
public void Foo (string bar) { ... }
[Obsolete]
[SupportedOSPlatformAttribute ("android26.0")]
public void Foo (int bar) { ... }If you are compiling against API-33 reference assemblies, there is no reasonable way to consume this API without generating an "obsolete" warning:
- Using the old method generates a warning
- Using the new method won't work on pre-API-33
In .NET 6 we did not have a good way to express "obsoleted in API X" warnings. In .NET 7 [ObsoletedOSPlatformAttribute] has been added, allowing us to express this properly.
In order to support this, we will need to:
-
Extend-api-mergeto generateobsoleted-indataapi-mergealready generatesdeprecated-since([api-merge] add deprecation platform information to API description #824) - Extend
generatorto consume that data and output the new attribute ([generator] Add support for[ObsoletedOSPlatform]. java-interop#1026)
AmrAlSayed0
Metadata
Metadata
Assignees
Labels
No labels