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

Update DynamicallyAccessedMembers annotation on EventSource #110001

Merged
merged 2 commits into from
Nov 21, 2024

Commits on Nov 20, 2024

  1. Update DynamicallyAccessedMembers annotation on EventSource

    This takes advantage of dotnet#109814. This is in theory a breaking change in case someone took advantage
    of our annotation and is doing their own reflection on `EventSource` descendants.
    
    Someone else reflecting on EventSource is problematic however. We placed around various suppressions
    due to our own annotations like this:
    
    https://github.com/dotnet/runtime/blob/0d62887a30553b8177dc90f9e39559be0e6c7707/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs#L414-L424
    
    It means that if someone else is reflection-accessing these, they would not get a trimming warning.
    Hopefully, nobody does that. This PR also assumes that nobody does that (and the PR should therefore
    not be breaking in practice).
    
    We annotate the class for our purposes, but someone else could be taking advantage of that in their own code.
    MichalStrehovsky committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    49968e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f29317 View commit details
    Browse the repository at this point in the history