Make availability attributes between AppKit and UIKit consistent
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 123
Description
There are many types that are identical (or almost so) between AppKit and UIKit. Depending on where we've bound those types (in xkit.cs or appkit.cs/uikit.cs), we might have conflicting availability attributes.
For example:
1. A type declared in both appkit.cs and uikit.cs would say it's only available for Mac when declared in appkit.cs and only for iOS/tvOS in uikit.cs.
2. A type declared in xkit.cs may say it's available on all platforms, but then the generator will:
* Say it's available in macOS on the iOS/tvOS assemblies
* Say it's available in iOS/tvOS in the macOS assembly.
I believe the first case makes most sense, because the type isn't technically the same, since the namespace is different.
This means the second case needs to be fixed. One potential avenue of research would be for the generator to be able to override attributes if it knows a type isn't available on a given platform - for instance that UIKit.SomeType will not say it's available on macOS, because the generator knows that UIKit isn't available on macOS.
This scenario can be triggered by removing the AppKit/UIKit exceptions in the AttributeTest.FindSupportedOnElementsThatDoNotExistInThatAssembly cecil test.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.