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

Allow trimming of events when event methods are not reflected over #102576

Open
sbomer opened this issue May 22, 2024 · 1 comment
Open

Allow trimming of events when event methods are not reflected over #102576

sbomer opened this issue May 22, 2024 · 1 comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Milestone

Comments

@sbomer
Copy link
Member

sbomer commented May 22, 2024

From @MichalStrehovsky in #102528 (comment):

Another option could be to just stop doing the special behavior that looks for an event when an accessor is marked and let the event itself be trimmed. Only keep events that are visible targets of reflection (in that case consider the accessors reflection accessed as well).

I think there is an issue somewhere to do the same thing with properties. It's a bit more tricky for properties because debugger looks at them (we could only trim property metadata with DebuggerSupport=false), but events aren't surfaced in the debugger (and I don't see a future where they could be surfaced based on how event metadata works) so this shouldn't really affect debuggability and we can do it always.

This would simplify some of the special handling around events (see #102528 for full context).

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 22, 2024
@sbomer sbomer added the area-Tools-ILLink .NET linker development as well as trimming analyzers label May 22, 2024
@sbomer sbomer added this to the 9.0.0 milestone May 22, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 22, 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.

@jtschuster jtschuster removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
Status: No status
Development

No branches or pull requests

2 participants