Add a cecil test to compare [Availability] attributes (legacy) with [SupportedOSPlatform] (net6) #12544
Labels
dotnet
An issue or pull request related to .NET (6)
dotnet-pri3
.NET 6: wishlist for stable release
enhancement
The issue or pull request is an enhancement
Milestone
Original discussion
https://discord.com/channels/732297728826277939/732297808148824115/879993217762857010
Background
[Availability]
-based, attributes into[SupportedOSPlatform]
[Availability]
-based attributes.Problem
[iOS (12,3)]
on an API that was added in[iOS (12,1)]
would not be spotted by runtime test checks.Potential Solutions
The real question is when to do something...
Do nothing
Why ?
Add New Unit Tests
Each set of attributes, legacy and dotnet, exists in separate assemblies. Comparing them requires loading both so that would make it (easier to be a) cecil-based test.
Still this will not be perfect. This will only ensure that the legacy attributes are a match with the new net6 attributes (IOW GIGO).
Lifetime: This will be useful as long as legacy is supported.
The text was updated successfully, but these errors were encountered: