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
Fix remaining holes in stack trace demangling #60478
Conversation
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.
Only real concern is removing the test - it's not entirely clear to me why we should allow that test to fail now.
I actually renamed the file then boiled it down to what it is now, which is basically testing if FlutterErrorDetails.toDiagnosticsNode fails. Looking back at it, the added redundancy of a slightly more practical use case is probably a good thing so I'll just re-introduce the original test. |
Weird, your async_gap_test.dart doesn't fail if I comment out the assignment of demangleStackTrace, where was it supposed to fail before? |
I think as long as the test isn't failing it's fine, but we should keep the test. If something's broken, the test should end up failing on your new assert that we don't have a line like |
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.
* Implement stack trace demangling in the framework.
flutter#60916) This reverts commit d986fdc.
…r#60478)" (flutter#60916)" (flutter#60996) This reverts commit 2c7e5dd.
Description
Follow-up of #59900
Instead of forcing every implementer of
FlutterError.onError
(both internally and externally) to manually demangle stack traces, we cover the small number of places in the framework that parse them.StackFrame
parsing when it encounters package:stack_trace async gap delimiters, this prevents people from assuming the vm's own stack trace format changed, as we all initially assumed.FlutterError.demangleStackTrace
to allow testing environments to provide their own demangle callbacks.FlutterError.defaultStackFilter
orStackFrame.fromStackString
could be passed an external stack trace.Related Issues
Fixes any remaining instances of #59893
Breaking Change
None of these changes should be breaking, and all local tests are passing.