[ios-clr] Fix CustomAttributeDecoderTests when type references point to System.Private.CoreLib#127059
Open
kotlarmilos wants to merge 1 commit intodotnet:mainfrom
Open
[ios-clr] Fix CustomAttributeDecoderTests when type references point to System.Private.CoreLib#127059kotlarmilos wants to merge 1 commit intodotnet:mainfrom
kotlarmilos wants to merge 1 commit intodotnet:mainfrom
Conversation
…to System.Private.CoreLib After ILLink processing, type references in the test assembly may be redirected from System.Runtime to System.Private.CoreLib. The test hard-codes the expected assembly name and fails to match the decoder output. Resolve the actual assembly-reference name from metadata at test time and compare enum types by FullName. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates CustomAttributeDecoderTests to be resilient to ILLink/trimming changes where System.Type type references may be redirected from System.Runtime to System.Private.CoreLib, ensuring the decoder output comparisons remain stable across these assembly-identity differences.
Changes:
- Resolve the expected
System.Typeassembly reference directly from the test assembly’s metadata (viaPEReader) and use it consistently in assertions/type-provider logic. - Compare enum types using
FullName(after normalizing nested-type separators) instead of relying on runtimeType.GetTyperesolution. - Improve the thrown
ArgumentOutOfRangeExceptionwith a descriptive message and remove a now-unneededActiveIssuegate.
Member
Author
|
/azp run runtime-extra-platforms |
Contributor
|
Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Apr 17, 2026
Open
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.
Description
Part of splitting #125439 into smaller, self-contained PRs.
After ILLink processing, type references in the test assembly may be redirected from
System.RuntimetoSystem.Private.CoreLib. The test hard-codes the expected assembly name and fails to match the decoder output. Resolve the actual assembly-reference name from metadata at test time and compare enum types byFullName(so they match across assembly identities).