[tools] Fix marking generated block code when not using any of the static registrars#25434
[tools] Fix marking generated block code when not using any of the static registrars#25434rolfbjarne wants to merge 7 commits into
Conversation
…forms for monotouch-test.
There was a problem hiding this comment.
Pull request overview
This PR extends the xharness Jenkins test matrix for monotouch-test by introducing additional linker coverage across all platforms, adding explicit Link SDK and Link All runs (as Release variations). This fits into the tests/xharness infrastructure that defines how CI expands a single test project into multiple build/run configurations.
Changes:
- Add
Release|LinkSdkvariation formonotouch-test. - Add
Release|LinkAllvariation formonotouch-test.
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.
Use IsLinkAny instead of IsLinkAll for trimming guards, since SDK-level trimming (linksdk) can also remove framework references, properties, and delegate mismatch checking code from SDK assemblies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
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.
The PreserveBlockCodeStep only handled old-style block proxy types (with a Handler field and [MonoPInvokeCallback] attribute on Invoke). New-style block proxy types use [UnmanagedCallersOnly] on Invoke with no Handler field. When using linkall + dynamic registrar (the default on iOS simulator), the existing MarkForStaticRegistrar[Step] does not run (gated on RegistrarMode.Static), so the Invoke method was trimmed. At runtime, the reflection lookup in Blocks.GetBlockForDelegate would then fail with MX8060. Extend PreserveBlockCodeStep to also detect and preserve new-style block proxy Invoke methods, matching on [UnmanagedCallersOnly] and [UserDelegateType] attributes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
74a2acf to
81c5280
Compare
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.
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.
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.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #9437415] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #9437415] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #9437415] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [CI Build #9437415] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 1 tests failed, 182 tests passed. Failures❌ monotouch tests (macOS)1 tests failed, 19 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Uh oh!
There was an error while loading. Please reload this page.