-
Notifications
You must be signed in to change notification settings - Fork 516
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
[generator] Fix an issue where we'd not copy attributes from inlined protocols. #17381
[generator] Fix an issue where we'd not copy attributes from inlined protocols. #17381
Conversation
…protocols. Protocols with one set of introduced attributes ([TV (12, 0)]) inlined in types that were introduced in a different version ([TV (10, 0)]) would always use the attributes from the type. This is wrong if the protocol was introduced after the type, in which case we should instead use the introduced attributes from the protocol. Fix this by choosing the latest introduced attribute when we have multiple to choose from. This required passing a bit more information around so that we always know if a member is being inlined in another type. This PR will also print availability attributes on the protocol members themselves: [Protocol] interface IProtocol { [TV (12, 0)] // this was not printed before [Export ("someProperty")] string SomeProperty { get; set; } } Also add and improve some tests. Contributes towards xamarin#14802.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 688fa45 you removed the filtering for the inline protocols that is now fixed in this PR. Should we get back to get appkit and uikit running this tests?
The AppKit/UIKit problem is different, it happens for things like this: Lines 94 to 106 in 41384c6
where that ends up being |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 225 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. [attempt 2] Html Report (VSDrops) Download Pipeline on Agent |
Protocols with one set of introduced attributes ([TV (12, 0)]) inlined in
types that were introduced in a different version ([TV (10, 0)]) would always
use the attributes from the type.
This is wrong if the protocol was introduced after the type, in which case we
should instead use the introduced attributes from the protocol.
Fix this by choosing the latest introduced attribute when we have multiple to
choose from.
This required passing a bit more information around so that we always know if
a member is being inlined in another type.
This PR will also print availability attributes on the protocol members themselves:
Also add and improve some tests.
Contributes towards #14802.