Skip to content

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Oct 2, 2024

Similar to #81864, fields in a RUC class are producing trim analysis warnings in the OOB trim step (the mentioned issue was specific to library mode, but it's also a problem for the normal root assembly mode).

This extends the fix from #84620 to avoid producing warnings for fields that are marked just because an assembly was rooted. There was some discussion around whether this is the right approach - since arguably rooting an assembly should warn about rooted RUC members. But that's not the case today for RUC methods, so this makes the behavior consistent for fields.

This came up in #108464.

@sbomer sbomer requested a review from a team October 2, 2024 22:15
@sbomer sbomer requested a review from marek-safar as a code owner October 2, 2024 22:15
@ghost ghost added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Oct 2, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Oct 2, 2024
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

…ty/RequiresInRootAllAssembly.cs

Co-authored-by: Jackson Schuster <[email protected]>
@sbomer
Copy link
Member Author

sbomer commented Oct 4, 2024

/ba-g "dead-lettered work item and timeout"

@sbomer sbomer merged commit e67f230 into dotnet:main Oct 4, 2024
sirntar pushed a commit to sirntar/runtime that referenced this pull request Oct 8, 2024
…dotnet#108498)

Similar to dotnet#81864, fields
in a RUC class are producing trim analysis warnings in the OOB
trim step (the mentioned issue was specific to library mode, but
it's also a problem for the normal root assembly mode).

This extends the fix from
dotnet#84620 to avoid producing
warnings for fields that are marked just because an assembly was
rooted. Arguably rooting an assembly _should_ warn about rooted
RUC members, but that's not the case today for RUC methods, so
this makes the behavior consistent for fields.

---------

Co-authored-by: Jackson Schuster <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants