Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator][dotnet] Add support for
[Uns|S]upportedOSPlatformAttribute
This moves our current/legacy attributes to the ones added in dotnet 5 [1]. Short Forms (only in bindings) | Old | New | |---------------------------------------|-------------------------------------| | [iOS (7,0)] | [SupportedOSPlatform ("ios7.0")] | | [NoIOS] | [UnsupportedOSPlatform ("ios")] | Long Forms | Old | New | |---------------------------------------|-------------------------------------| | [Introduced (PlatformName.iOS, 7,0)] | [SupportedOSPlatform ("ios7.0")] | | [Obsoleted (PlatformName.iOS, 12,1)] | [Obsolete (...)] | | [Deprecated (PlatformName.iOS, 14,3)] | [UnsupportedOSPlatform ("ios14.3")] | | [Unavailable (PlatformName.iOS)] | [UnsupportedOSPlatform ("ios")] | Other changes * `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]` are not allowed on `interface` [2] which means they cannot be used for protocols. This is currently handled by inlining the existing attributes on all members. * `[ObsoletedInOSPlatform]` was removed in net5 RC. This PR is now mapping the existing attributes to `[Obsolote]`, however multiple ones cannot be added so they need to be platform specific. Still Missing * [ ] Generator deduplication of type/members attributes for interfaces (due to [2]) * [ ] Manual bindings * [ ] Introspection tests updates References * [1] xamarin#10170 * [2] dotnet/runtime#47599 * [3] dotnet/runtime#47601
- Loading branch information