Repository navigation
Conversation
Propagate the public-constructor trimming contract through the generic empty-view fixture helper so both legacy and Items2 handler registrations remain activatable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88507d92-22fd-466c-86de-65cf187bf15b
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:17 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39572Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39572" |
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:17 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:18 — with
GitHub Actions
Inactive
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:20 — with
GitHub Actions
Inactive
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:22 — with
GitHub Actions
Inactive
kubaflo
temporarily deployed
to
copilot-pat-pool
October 22, 2026 19:22 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Supported-Xcode candidate validation and current required-check results remain unverified, despite the reported local causal validation.
No open issues 🎉
What changed in this PR
This PR fixes constructor preservation for the grouped CollectionView device-test helper on net11.0, independently of the GC fixture changes in #39536.
Changes:
- Adds
DynamicallyAccessedMembers(PublicConstructors)to the helper’s handler type parameter to preserve constructors needed for dependency-injection activation. - Leaves legacy and modern handler tests, inherited fixture executions, and existing assertions unchanged.
| File | Description |
|---|---|
| src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs | Imports the annotation namespace and propagates the public-constructor preservation contract. |
Review effort: Balanced
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Superseded by #39536. This exact test-only fix is now included in the consolidated PR at
63ef2602a7b7350595f10236097056991a55550e, with identical file contents and preserved attribution. This standalone PR is being closed without merging. The per-fix evidence below remains historical evidence for this PR's original head, not new native validation of the combined head; combined-head checks and pending CI are documented in #39536.Fix the pre-existing grouped CollectionView device-test activation failure on net11.0, independently of the GC fixture changes in #39536. This PR intentionally targets
net11.0, based on7b0ea7800db3f3faccbaecb665d32b7c61eaf932.VerifyGroupedCollectionViewEmptyViewTracksGroups<THandler>registers its handler throughAddHandler<CollectionView, THandler>(), whose handler parameter requiresDynamicallyAccessedMembers(PublicConstructors). The test helper did not propagate that contract. The trimmed iOS Mono app retained the legacyItems.CollectionViewHandlertype but removed both public constructors, causingActivatorUtilitiesto throwCtorNotLocatedbefore the empty/group assertions ran.This was verified in the actual exact-base device build 1643729 binaries: the pre-link assembly has both constructors, whereas the deployed iOS Mono app has zero. The modern
CollectionViewHandler2retains both. The same legacy activation failures also occur in device build 1644557, with identical exact-base stacks.Propagate
PublicConstructorson the helper's generic parameter. One test file, two insertions and one deletion. Keep both legacy/modern facts, their inherited navigation-handler fixture executions, normal DI activation, and every original native empty-view/group assertion. No product, dependency, pipeline, GC, navigation, skip, retry, delay, or tolerance changes.Native causal validation -- LIMITED local evidence, not supported-Xcode hosted certification
The complete repository
Controls.DeviceTestsiOS Mono application was rebuilt separately for every arm using the pinned SDK 11.0.100-rtm.26514.118 (product 11.0.100), iOS workload 27.0.12230, and Mono 11.0.0. Runs used a task-owned headless iPhone 11 Pro / iOS 18.5 simulator and XHarness xUnit, with an explicitmlaunch --quiet-simulatorwrapper.The local machine has Xcode 26.6, not the workload's required Xcode 27. The build used only the repository-documented
/p:ValidateXcodeVersion=falsecompatibility override and the device runner's standard/p:TreatWarningsAsErrors=false; the existing MAUI1001 and legacy-handler CS0618 warnings remained visible. No header/linker/runtime errors, code-signing checks, or OS warnings were bypassed. The actual native executable linkslibmonosgen-2.0.dylib.Every fresh XML contains the same 82 class-pair records, the same eight pre-existing skipped identities, and zero assembly errors. The four target records are
GroupedCollectionViewEmptyViewTracksGroupsandGroupedCollectionViewEmptyViewTracksGroups2in bothCollectionViewTestsandCollectionViewNavigationHandlerTests; none is skipped. Both modern-handler cases pass in every arm. Both legacy cases fail with identicalCtorNotLocatedmessages/stacks in baseline/revert and pass every original assertion in candidate/restore. All 12 XML declarations, 984 test records, 48 target records, constructor metadata, generic annotations, and XML SHA-256 values were independently reconciled.Commands/results (
Dis the read-only private copy of the pinned SDK/workloads;Eis the preserved session evidence directory):Fresh hosted baseline: the single scoped device build 1645782, pinned to unchanged base
7b0ea780, completed. The Mono build succeeded; all seven excluded stages were actually skipped. The CollectionView work-item XML on bothosx.15.arm64.maui.openandosx.26.arm64.opencontains 83 total / 73 passed / 2 failed / 8 skipped / 0 errors. Both legacy base/inherited facts fail with the exactCtorNotLocatedexception and both modern facts pass. No retry, requeue or further hosted run was requested. This is fresh hosted baseline-red evidence, not a hosted candidate result.Coverage limits: the candidate's green causal evidence is genuine native iOS Mono execution, but only under the explicit local Xcode compatibility override. It is not Xcode 27 candidate certification, hosted candidate results, MacCatalyst/CoreCLR validation, full CollectionView-category candidate validation, or a claim that all net11.0 CI is green. The local matrix covers the 82-record class pair; the hosted baseline's full category has one additional passing record.
Open and recently merged PRs were checked for this helper, exception, file, and constructor-preservation mechanism. #37959 introduced the shared test helper; #38082 removed older Apple V1 coverage, but neither supplies this constructor contract. No equivalent fix was found. No approval or merge is requested from an agent.
Issues Fixed
No separate issue. Fixes the pre-existing
CtorNotLocatedfailures for the two legacy grouped-empty-view fixture executions observed while investigating #39536; it does not modify that PR's GC fixture or address the other baseline failure families.