Open MichalStrehovsky opened 4 months ago
@jamescrosswell work bringing this in too https://github.com/getsentry/Ben.Demystifier/
We're keeping our fork going while Ben isn't available here. Since this is used in https://github.com/getsentry/sentry-dotnet
In the end, someone will need to do the work to enable the AOT/trim/single file safety analyzers and address all the warnings, but this is enough to have a golden path that makes
sample/StackTrace
project produce the same results under native AOT as under JIT.Necessary fixes:
GetMethodBody
under AOT throws. This will not return anything useful under Mono with ILStrip either. The code simply needs to deal with it.MemberInfo
s (except forTypeInfo
). This is also true on JIT-based runtimes, but there's even less caching on native AOT. Use operator==
.TupleElementNamesAttribute
is trim-unfriendly and cannot be analyzed. Replace with no-reflection.