-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Check DebugStackTrace conditional execution/suppressions #3223
Comments
Could you give an update or add context? I take it we should get rid of the check. What would the alternative look like? |
I have none, I've just proxied the original linked suggestion so it is tracked |
I think what @MichalStrehovsky is saying is that we're suppressing a warning that is relevant to publishing single file applications. In the case that we're publishing an AOT app, yes it will be a single file app and so that warning is relevant. We then have this code to compensate for the suppression: sentry-dotnet/src/Sentry/Internal/DebugStackTrace.cs Lines 515 to 519 in d1e5efc
So the problem code never gets executed when publishing an AOT application. However if the application is not compiled AOT but is published as a Single file, the logic we have to avoid the problem code is not executed and we've also suppressed the warning (which is relevant to Single File apps)... so we can get into trouble. We never actually had any analysers in place to warn us about issues publishing single file applications so we may have had problems when using Sentry in Single File apps since long before we added support for AOT. I think the solution is to find a suppression method that is a bit more discriminating. The analyzers themselves can be enabled or disabled independently. Adding
We probably want to enable The question is then what to do about the |
What should work is to delete the if (assemblyName == "<unknown>")
{
assemblyName = null;
return null;
} after the Then it should be possible to keep the suppression because you're handling the single file case (native AOT is only a subset of the more broad single file case). |
Thank you @MichalStrehovsky - very much appreciated! |
Originally commented: dotnet/runtime#96528 (comment)
The text was updated successfully, but these errors were encountered: