Skip to content

Keep the trimming target type around if there's a template type layout for the trimming target#126382

Merged
jkoritzinsky merged 7 commits intodotnet:mainfrom
jkoritzinsky:ilc-external-constructed
Apr 6, 2026
Merged

Keep the trimming target type around if there's a template type layout for the trimming target#126382
jkoritzinsky merged 7 commits intodotnet:mainfrom
jkoritzinsky:ilc-external-constructed

Conversation

@jkoritzinsky
Copy link
Copy Markdown
Member

Contributes to #126177

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts NativeAOT dependency tracking for external type map entries so that trim-target types which can be canonically constructed by the runtime type loader also keep the relevant template type layout reachable.

Changes:

  • Add a conditional dependency from the trim target type to the canonical template type layout when the trim target has a distinct canonical form.
  • Ensures the template layout for the canonical form is present when the trim target type is kept due to an external type map entry.

@MichalStrehovsky
Copy link
Copy Markdown
Member

Could you add a regression test too?

@MichalStrehovsky
Copy link
Copy Markdown
Member

Build break in the test

Copilot AI review requested due to automatic review settings April 1, 2026 19:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings April 2, 2026 18:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

…nation.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 2, 2026 18:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings April 6, 2026 20:59
@jkoritzinsky jkoritzinsky force-pushed the ilc-external-constructed branch from 969e6cf to dd72bae Compare April 6, 2026 21:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@jkoritzinsky
Copy link
Copy Markdown
Member Author

/ba-g this already ran CI on this commit and passed. I messed up the commit trigger and re-pushed the same commit.

@jkoritzinsky jkoritzinsky enabled auto-merge (squash) April 6, 2026 21:40
@jkoritzinsky jkoritzinsky merged commit e19c810 into dotnet:main Apr 6, 2026
117 of 123 checks passed
@github-project-automation github-project-automation bot moved this to Done in AppModel Apr 6, 2026
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Apr 9, 2026
…t for the trimming target (dotnet#126382)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants