-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Assert that runApp is called in the same zone as binding.ensureInitialized #117113
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
Conversation
|
Looks like the checks are unhappy. Could you take a look? |
46b2dd5 to
2a13282
Compare
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
de79301 to
27161b9
Compare
19458af to
b35e2f6
Compare
|
This should be ready for review now. |
goderbauer
left a comment
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.
LGTM
dev/tracing_tests/test/common.dart
Outdated
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.
For my own understanding: What do these tests do with zones that required disabling the zone check? From scanning through the tests, it wasn't immediately clear to me.
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.
I suspect that test introduces a Zone to catch (async) errors? But I didn't spend much time trying to track it down, to be honest.
dev/tracing_tests/test/common.dart
Outdated
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.
Maybe give this a name that makes people feel bad if they were to use it in a newly written test to avoid that this pattern spreads further? Something like LegacyTestBinding, maybe?
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.
ZoneIgnoringTestBinding?
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.
assert that the thrown error actually contains some of the expected information to make sure we get the right one here?
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.
done (and hey, it was already the right one this time)
|
Thanks for the comments; applied the fixes. Will land on green. |
|
auto label is removed for flutter/flutter, pr: 117113, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Google tests found that I'd missed the driver binding when it comes to skipping the zone check. Trying again with the driver binding skipping the zone check. |
f2bf857 to
696d9d8
Compare
2dc3bc3 to
4161eff
Compare
|
@goderbauer I've walked this back a bit. Now it's a warning with a flag that lets you make it fatal, rather than an error. I did this because the google tests convinced me that making it fatal was too potentially breaking. I suggest we consider switching the default for the flag to true after a few more stable releases, once people have had enough advance warning. |
goderbauer
left a comment
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.
Still LGTM
|
auto label is removed for flutter/flutter, pr: 117113, due to - The status or check suite Mac web_tool_tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
auto label is removed for flutter/flutter, pr: 117113, due to - The status or check suite tool_tests-general-linux has failed. Please fix the issues identified (or deflake) before re-applying this label. |
cbatson
left a comment
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.
nit: typo
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.
| /// are encouraged to resolve any issues that case the [debugCheckZone] message | |
| /// are encouraged to resolve any issues that cause the [debugCheckZone] message |
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!
Fixes #94123