Fix nested type forwarder preservation#131331
Merged
Merged
Conversation
Record every simple type resolved from a type name so ILLink retains declaring and nested exported type chains. Add generic and non-generic regression coverage and re-enable the ConcurrentDictionary trimming test. Assisted-by: GitHub Copilot CLI:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20feb2ad-cfe6-49f7-8048-55e1c5ad425a
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the ILLink type-name resolution bookkeeping so that nested-type resolution from string literals can preserve the full exported-type / forwarder chain, adds regression coverage for nested forwarders (including generic), and re-enables a previously skipped ConcurrentDictionary trimming scenario test.
Changes:
- Update
TypeNameResolverto record simple type resolutions during nested-type parsing. - Add a new linker test case that exercises nested forwarded types via
Type.GetType, and extend the dependency library with a generic nested type. - Re-enable
ConcurrentDictionary_Generic_Tests_string_string.NonRandomizedToRandomizedUpgrade_FunctionsCorrectlyby removingActiveIssuegating.
Show a summary per file
| File | Description |
|---|---|
| src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/NestedTypeForwarderUsedViaReflection.cs | New regression coverage for nested (generic + non-generic) forwarded types resolved via Type.GetType strings. |
| src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/Dependencies/ForwardedNestedTypeLibrary.cs | Adds a forwarded generic nested type and forwards it in the forwarder assembly build. |
| src/tools/illink/src/linker/Linker/TypeNameResolver.cs | Moves/expands type-resolution recording to include nested resolution segments. |
| src/libraries/System.Collections.Concurrent/tests/ConcurrentDictionary/ConcurrentDictionary.Generic.Tests.cs | Removes ActiveIssue attributes to re-enable the previously skipped test on trimmed / mobile platforms. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 1
Assisted-by: GitHub Copilot:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20feb2ad-cfe6-49f7-8048-55e1c5ad425a
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.
Summary
Fixes #81945
Testing
Mono.Linker.Tests.TestCases.All.TypeForwardingTestsMono.Linker.Tests.TestCases.All.ReflectionTestsConcurrentDictionary_Generic_Tests_string_string.NonRandomizedToRandomizedUpgrade_FunctionsCorrectlyNote
This pull request was created with assistance from GitHub Copilot.