-
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
[linker] Remove more and earlier some attributes #14270
Conversation
* `[Model]` and `[Native]` are not needed at runtime if the dynamic registrar is removed * Removing (and storing) the attributes earlier make it's possible for them not to be marked. IOW the attribute type itself (and not just the decorations) can be removed. ```diff --- /var/folders/w_/zfvfxj_x3nbd8wlj9p4ck3xc0000gn/T/appcompare/diffcustomtooloutput/Microsoft.iOS.dll.a.text 2022-02-28 10:57:57.000000000 -0500 +++ /var/folders/w_/zfvfxj_x3nbd8wlj9p4ck3xc0000gn/T/appcompare/diffcustomtooloutput/Microsoft.iOS.dll.b.text 2022-02-28 10:57:57.000000000 -0500 @@ -43,14 +43,6 @@ { } } - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] - public sealed class ModelAttribute : Attribute - { - [MethodImpl(8)] - public ModelAttribute() - { - } - } public sealed class You_Should_Not_Call_base_In_This_Method : Exception { [MethodImpl(8)] @@ -584,11 +576,6 @@ return (Type)/*Error near IL_0001: Stack underflow*/; } } - - [MethodImpl(8)] - public ProtocolAttribute() - { - } } [AttributeUsage(AttributeTargets.Interface, AllowMultiple = true)] public sealed class ProtocolMemberAttribute : Attribute @@ -1248,7 +1235,6 @@ } } [Register("Microsoft_iOS__UIKit_UIApplicationDelegate", false)] - [Model] public class UIApplicationDelegate : NSObject, INativeObject, IDisposable { [MethodImpl(8)] @@ -1270,7 +1256,6 @@ } } [Flags] - [Native] public enum UIControlState : ulong { Normal = 0x0uL, @@ -2931,14 +2916,6 @@ return (NativeHandle)/*Error near IL_0001: Stack underflow*/; } } - [AttributeUsage(AttributeTargets.Enum)] - public sealed class NativeAttribute : Attribute - { - [MethodImpl(8)] - public NativeAttribute() - { - } - } public struct NativeHandle : IEquatable<NativeHandle> { private readonly IntPtr handle; ```
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View dotnet API diffView dotnet legacy API diffAPI Current PR diffℹ️ API Diff (from PR only) (please review changes) View dotnet API diffView dotnet legacy API diffGenerator diff✅ Generator Diff (no change) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results11 tests failed, 135 tests passed.Failed tests
Pipeline on Agent XAMBOT-1109.Monterey' |
A few tests fails to build with:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
❌ [CI Build] Windows Integration Tests failed ❌❌ Failed ❌ Pipeline on Agent |
💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11) passed. Pipeline on Agent |
✅ 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 |
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: simulator tests 0 tests crashed, 16 tests failed, 154 tests passed. Failures❌ dotnettests tests (iOS)
Html Report (VSDrops) Download ❌ dotnettests tests (tvOS)
Html Report (VSDrops) Download ❌ monotouch tests (iOS)
Html Report (VSDrops) Download ❌ monotouch tests (MacCatalyst)
Html Report (VSDrops) Download ❌ monotouch tests (macOS)
Html Report (VSDrops) Download ❌ monotouch tests (tvOS)
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Removing (and storing) the attributes earlier make it's possible for them not to be marked. IOW the attribute type itself (and not just the decorations) can be removed. Inspired by / extracted from xamarin#14270.
Hi @spouliot. Due to inactivity, we will close this pull request in 7 days. |
I've been looking into this, and it's a lot trickier than it looks for various reasons, so I'll be closing this. There's a tentative follow-up in #20224. |
Removing (and storing) the attributes earlier make it's possible for them not to be marked. IOW the attribute type itself (and not just the decorations) can be removed. Inspired by / extracted from xamarin#14270.
Removing (and storing) the attributes earlier make it's possible for them not to be marked. IOW the attribute type itself (and not just the decorations) can be removed. One side effect is that we'll have to manually mark the protocol wrapper type referenced in the [Protocol] attribute, since the [Protocol] attribute is now removed. Inspired by / extracted from #14270.
[Model]
and[Native]
are not needed at runtime if the dynamicregistrar is removed
Removing (and storing) the attributes earlier make it's possible for
them not to be marked. IOW the attribute type itself (and not just the
decorations) can be removed.