Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Jun 8, 2022

Separated from #105335. TGP passed: OCL:453732336:BASE:453732204:1654815855431:ecc85b03

Fixes #87423 I guess

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Jun 8, 2022
@LongCatIsLooong LongCatIsLooong force-pushed the _debugCanPerformMutations branch from ba513f2 to 9c17dab Compare June 9, 2022 07:42
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review June 9, 2022 16:00
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Comment on lines 135 to 136
Copy link
Member

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.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: inconsistent quotes

Copy link
Member

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?

Copy link
Contributor Author

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.

@LongCatIsLooong LongCatIsLooong force-pushed the _debugCanPerformMutations branch from efaf1b9 to ff8a28d Compare July 2, 2022 00:26
@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 2, 2022
@auto-submit auto-submit bot merged commit 09a5382 into flutter:master Jul 2, 2022
@LongCatIsLooong LongCatIsLooong deleted the _debugCanPerformMutations branch July 2, 2022 01:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 2, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 2, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_debugCanPerformMutations assert improvements

2 participants