Repository navigation
Conversation
Cecil's TypeDefinition.ContainsGenericParameter is false for open generic type definitions, so the trimmable registrar still emitted invalid newobj instructions for generic NSObject proxies. NativeAOT then reported that NSLayoutAnchor<T>_Proxy.CreateObject would always throw.\n\nUse HasGenericParameters for NSObject, INativeObject, and protocol-wrapper proxy generation, and add focused assembly-preparer coverage that verifies generic CreateObject proxies throw instead of constructing an open generic type.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: ece6a6bd-3e29-4559-b8f3-4465690e25a4
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The generic INativeObject and protocol-wrapper paths lack regression coverage.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Backports the trimmable registrar fix for invalid open-generic proxy construction.
Changes:
- Detects generic proxy types using
HasGenericParameters. - Adds regression coverage for generic
NSObjectproxies.
| File | Description |
|---|---|
tools/dotnet-linker/Steps/TrimmableRegistrarStep.cs |
Corrects generic detection across proxy-generation paths. |
tests/assembly-preparer/ManagedRegistrarStepTests.cs |
Tests generated NSObject proxy IL. |
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.
|
|
CI blocker: repeatable macOS ReadyToRun app-size baseline mismatch At head The original attempt and the retry both report the same +14,426-byte mismatch. The NUnit result contains one failed test; this is an app-size assertion, not a build, provisioning, or simulator-launch failure. The CI size diff accounts for the entire delta:
For context, both macOS CoreCLR interpreter variants pass with a +9,089-byte difference, and both NativeAOT variants pass with a -12-byte difference. This establishes a repeatable output/baseline mismatch; it does not establish that all of the growth was introduced by this PR. Required fix: reconcile No source or expected files have been changed by this monitor. I have not queued another retry for this repeatable size assertion. Note This CI analysis was generated by GitHub Copilot. |
|
✅ Applied expected app size files from gist. |
|
@copilot resolve the merge conflicts in this pull request be very thorough and rubber duck your patch with other models |
| @@ -1,13 +1,13 @@ | |||
| AppBundleSize: 333,078,531 bytes (325,272.0 KB = 317.6 MB) | |||
| AppBundleSize: 333,092,957 bytes (325,286.1 KB = 317.7 MB) | |||
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.
|
@copilot resolve the merge conflicts in this pull request |
…backport-pr-26810-release/11.0.1xx-2026-10-02 # Conflicts: # tests/assembly-preparer/ManagedRegistrarStepTests.cs Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
Head branch was pushed to by a user without write access
922f824
Resolved and published in merge commit Note AI-generated by GitHub Copilot. |
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)❗ API diff vs stable (Breaking changes)NET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #922f824] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 269 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |

Cecil's
TypeDefinition.ContainsGenericParameteris false for open generic type definitions, so the trimmable registrar still emitted invalidnewobjinstructions for genericNSObjectproxies. NativeAOT then reported thatNSLayoutAnchor<T>_Proxy.CreateObjectwould always throw:Use
HasGenericParametersforNSObject,INativeObject, and protocol-wrapper proxy generation, and add focused assembly-preparer coverage that verifies genericCreateObjectproxies throw instead of constructing an open generic type.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: ece6a6bd-3e29-4559-b8f3-4465690e25a4
Backport of #26810.