-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add error messages to _debugCanPerformMutations
#105638
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
Add error messages to _debugCanPerformMutations
#105638
Conversation
ba513f2 to
9c17dab
Compare
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.
Previously, this condition was checked on every node on the path to the activeLayoutRoute, but now it is only checked for the activeLayoutRoot. For my own understanding, why is this change considered ok?
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.
The original implementation seems to make more sense. Changed.
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.
Other methods then markNeedsLayout check _debugCanPerformMutations - wouldn't this message be confusing in those cases?
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.
changed was marked as needing layout to was mutated.
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.
We should test that the right ROs are mentioned in these errors.
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
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: inconsistent quotes
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.
Do you actually need the result variable anymore? Seems like this either returns true now or it throws so we could simplify the code and remove this?
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 when the result is true I think (so the assert doesn't assert). One thing this provides is since result is a late final, if _debugCanPerformMutations is accidentally called in release mode it crashes.
efaf1b9 to
ff8a28d
Compare
Separated from #105335. TGP passed: OCL:453732336:BASE:453732204:1654815855431:ecc85b03
Fixes #87423 I guess
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.