Skip to content
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

ILLink: Add test for event warning origin issue #102405

Merged
merged 3 commits into from
May 28, 2024

Conversation

jtschuster
Copy link
Member

Marking of events is a little weird in the trimmer. If any method is marked, all methods will be marked, but the other methods will be marked as a dependency of the first marked event method. This leads to warnings for the add method showing up on the remove method if the remove method is the only one referenced in the method body.

This is an example of #100499 that I couldn't find elsewhere in the tests.

@jtschuster jtschuster requested a review from sbomer May 17, 2024 22:15
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label May 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label May 17, 2024
Copy link
Contributor

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

Copy link
Member

@sbomer sbomer left a comment

Choose a reason for hiding this comment

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

Thanks! Note there are a few existing tests that aren't explicitly written for this, but hit the bug: https://github.com/search?q=repo%3Adotnet%2Fruntime%20https%3A%2F%2Fgithub.com%2Fdotnet%2Fruntime%2Fissues%2F100499&type=code

@jtschuster jtschuster merged commit 7936514 into dotnet:main May 28, 2024
76 checks passed
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
Marking of events was a little weird in the trimmer. Previously, if any method is marked, all methods will be marked, but the other methods will be marked as a dependency of the first marked event method. This leads to warnings for the add method showing up on the remove method if the remove method is the only one referenced in the method body. The behavior has been fixed, but this commit adds a test for regression on this behavior.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 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