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] Fix origin for warnings due to event methods #100500

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Apr 1, 2024

Fixes part of #100499. This fixes the warning origin to prevent warnings from being reported on events for annotated event methods. Instead the warning is shown at the location that introduces the dependency on the event.

Doesn't fix the multiple warnings reported in some cases. This is due to MarkEvent also marking event methods, unlike MarkProperty. We might consider fixing this too, but it was looking like a larger change than I wanted to make here.

This removes some spurious warnings that were showing up when bubbling up RUC in winforms.

@sbomer sbomer requested a review from marek-safar as a code owner April 1, 2024 22:26
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Apr 1, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Apr 1, 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
Contributor

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr, @marek-safar
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

Thanks!

@sbomer sbomer merged commit eb73369 into dotnet:main Apr 3, 2024
78 of 80 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
This fixes the warning origin to prevent warnings from being
reported on events for annotated event methods. Instead the
warning is shown at the location that introduces the dependency
on the event.

Doesn't fix the multiple warnings reported in some cases. This is
due to MarkEvent also marking event methods, unlike
MarkProperty. We might consider fixing this too, but it was
looking like a larger change than I wanted to make here.

This removes some spurious warnings that were showing up when
bubbling up RUC in winforms.
@github-actions github-actions bot locked and limited conversation to collaborators May 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.

3 participants