-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Fixed Trim warnings in DiagnosticSource and WinUIUnhandledException integrations #3410
Conversation
src/Sentry.DiagnosticSource/Internal/DiagnosticSource/ReflectionHelper.cs
Outdated
Show resolved
Hide resolved
/// </remarks> | ||
internal static class ReflectionHelper | ||
{ | ||
[UnconditionalSuppressMessage("TrimAnalyzer", "IL2075", Justification = AotHelper.SuppressionJustification)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: Could we have added the attribute where this was moved from, instead of having that in a new ReflectionHelper
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have yes. The main reason I moved it was to put it in the DiagnosticSource namespace (to make it clear that it wasn't intended to be used beyond that scope - it's a bit of a retro way of instrumenting things and I don't think we want to replicate this anywhere else).
It was in a MiscExtensions
class so it it wasn't closely related to any of the other functionality that we pulled this away from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Resolves #3304
TODO: Testing
Sentry.Samples.Console.Basic
project with trimming enabledAotHelper.IsTrimmed
so that we could "mock" this during testing.