Closed bruno-garcia closed 3 years ago
Ah; made a change so the runtime also hid stacks marked with MethodImplOptions.AggressiveInlining
which is detected with
mb.MethodImplementationFlags & MethodImplAttributes.AggressiveInlining
; which meant StackTraceHidden
wasn't needed for these methods.
So probably should take the same approach?
Running against .NET 5, the test
MixedStack
fails as a new frame shows up:TResult System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>.GetResult()
.In this change to the runtime (corefx) you've added the attributes but it seems like it's are gone now.
The current approach is to either rely on the attribute or fallback to the type checks: https://github.com/benaadams/Ben.Demystifier/blob/87375e9013db462ad5af21bc308bc73c63cfe919/src/Ben.Demystifier/EnhancedStackTrace.Frames.cs#L665-L703
I could open a PR that removes the
if
and tries both strategies. Let me know if this is the approach you want to take, or another?