Skip to content

Don't warn for reflection access to compiler-generated code #104757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Jul 11, 2024

Fixes #85042

@ghost ghost added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Jul 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Jul 11, 2024
Comment on lines -185 to +187
CompilerGeneratedMemberAccessedViaReflection = 2118,
DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMember = 2119,
DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMemberOnBase = 2120,
_unused_CompilerGeneratedMemberAccessedViaReflection = 2118,
_unused_DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMember = 2119,
_unused_DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMemberOnBase = 2120,
Copy link
Member

Choose a reason for hiding this comment

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

Will we also doc that people shouldn't expect this warning anymore? We could even go as far as saying this is safe to suppress since it's likely this generates more false positives than point out real issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like we didn't doc these warnings yet so I think we can just leave them undocumented.

@sbomer
Copy link
Member Author

sbomer commented Jul 16, 2024

/ba-g "The machine restarted and Azure DevOps can't recover from restarts."

@sbomer sbomer merged commit bbabbc9 into dotnet:main Jul 16, 2024
158 of 160 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 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.

Trimming: Reflection access to compiler generated methods produces warnings
2 participants