Skip to content

Conversation

@auto-submit
Copy link
Contributor

@auto-submit auto-submit bot commented May 29, 2024

Reverts: #147856

Initiated by: loic-sharma

Reason for reverting: tree is closed with errors like:

test/integration.shard/break_on_framework_exceptions_test.dart: breaks when rebuilding dirty elements throws [E]
  Expected: <45>
    Actual: <2756>
  
  package:matcher                                                       expect
  test\integration.shard\break_on_framework_exceptions_test.dart 56:5   main.expectException
  ===== asynchronous gap ===
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: LongCatIsLooong
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {goderbauer}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/146379: introduces `Element.buildScope` which `BuildOwner.buildScope` uses to identify subtrees that need skipping (those with different `BuildScope`s). If `Element.update` calls `updateChild` then dirty children will still be rebuilt regardless of their build scopes. 

This also introduces `LayoutBuilder.applyDoubleRebuildFix` migration flag which should only live for a week or less. 

Caveats: 

`LayoutBuilder`'s render object calls `markNeedsLayout` if a descendant Element is dirty. Since `markNeedsLayout` also implies `markNeedsPaint`, the render object is going to be very repaint/relayout-happy.

Tests: 

Presubmits with the migration flag set to true: https://github.com/flutter/flutter/pull/147856/checks?check_run_id=24629865893


## 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].
- [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
- [ ] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes

<!-- end_revert_body -->

@auto-submit auto-submit bot added the revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. label May 29, 2024
@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label May 29, 2024
@auto-submit auto-submit bot merged commit ebc4143 into master May 29, 2024
@auto-submit auto-submit bot deleted the revert_bafdb124c76d943542643a462af65fe1607e1263 branch May 29, 2024 23:29
hello-coder-xu added a commit to hello-coder-xu/flutter that referenced this pull request May 30, 2024
* master: (115 commits)
  Roll Flutter Engine from 4adf453b6d68 to 19707e811b60 (1 revision) (flutter#149291)
  disable Impeller on external texture test. (flutter#149292)
  Roll Flutter Engine from 8d5d14a1db95 to 4adf453b6d68 (12 revisions) (flutter#149290)
  Update 3.22.1 release notes to include missing fix. (flutter#148999)
  Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (flutter#149263)
  Reverts "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149279)
  Unskip expression evaluation test (flutter#149253)
  temporarily disable SemanticsAction tests to unblock engine change (flutter#149274)
  Adds benchmark for rrect_blur. (flutter#149261)
  Prevent LayoutBuilder from rebuilding more than once (flutter#147856)
  Add test for inherited_theme.0.dart (flutter#149120)
  Update progress_indicator.dart to indicate the adaptive option is for both macOS and iOS (flutter#145246)
  _ModalScopeStatus as InheritedModel (flutter#149022)
  Add test for radio.toggleable.0.dart (flutter#149153)
  Add a sentinel value for `TextStyle.height` (flutter#149049)
  Remove dynamic_layouts from issue template (flutter#149252)
  Roll Flutter Engine from 30aa720d4999 to 60968ee3bde7 (1 revision) (flutter#149255)
  Roll Flutter Engine from b26e1b023cdb to 30aa720d4999 (7 revisions) (flutter#149249)
  Roll Packages from a933c30 to 31d3329 (6 revisions) (flutter#149246)
  Clean leak in editable_text_test.dart. (flutter#149223)
  ...
hello-coder-xu added a commit to hello-coder-xu/flutter that referenced this pull request May 30, 2024
* master: (115 commits)
  Roll Flutter Engine from 4adf453b6d68 to 19707e811b60 (1 revision) (flutter#149291)
  disable Impeller on external texture test. (flutter#149292)
  Roll Flutter Engine from 8d5d14a1db95 to 4adf453b6d68 (12 revisions) (flutter#149290)
  Update 3.22.1 release notes to include missing fix. (flutter#148999)
  Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (flutter#149263)
  Reverts "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149279)
  Unskip expression evaluation test (flutter#149253)
  temporarily disable SemanticsAction tests to unblock engine change (flutter#149274)
  Adds benchmark for rrect_blur. (flutter#149261)
  Prevent LayoutBuilder from rebuilding more than once (flutter#147856)
  Add test for inherited_theme.0.dart (flutter#149120)
  Update progress_indicator.dart to indicate the adaptive option is for both macOS and iOS (flutter#145246)
  _ModalScopeStatus as InheritedModel (flutter#149022)
  Add test for radio.toggleable.0.dart (flutter#149153)
  Add a sentinel value for `TextStyle.height` (flutter#149049)
  Remove dynamic_layouts from issue template (flutter#149252)
  Roll Flutter Engine from 30aa720d4999 to 60968ee3bde7 (1 revision) (flutter#149255)
  Roll Flutter Engine from b26e1b023cdb to 30aa720d4999 (7 revisions) (flutter#149249)
  Roll Packages from a933c30 to 31d3329 (6 revisions) (flutter#149246)
  Clean leak in editable_text_test.dart. (flutter#149223)
  ...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 30, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 30, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 30, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 30, 2024
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
…r#147856)" (flutter#149279)

Reverts: flutter#147856
Initiated by: loic-sharma
Reason for reverting: tree is closed with errors like: 

```
test/integration.shard/break_on_framework_exceptions_test.dart: breaks when rebuilding dirty elements throws [E]
  Expected: <45>
    Actual: <2756>
  
  package:matcher                                                       expect
  test\integration.shard\break_on_framework_exceptions_test.dart 56:5   main.expectException
  ===== asynchronous gap ===
Original PR Author: LongCatIsLooong

Reviewed By: {goderbauer}

This change reverts the following previous change:
Fixes flutter#146379: introduces `Element.buildScope` which `BuildOwner.buildScope` uses to identify subtrees that need skipping (those with different `BuildScope`s). If `Element.update` calls `updateChild` then dirty children will still be rebuilt regardless of their build scopes. 

This also introduces `LayoutBuilder.applyDoubleRebuildFix` migration flag which should only live for a week or less. 

Caveats: 

`LayoutBuilder`'s render object calls `markNeedsLayout` if a descendant Element is dirty. Since `markNeedsLayout` also implies `markNeedsPaint`, the render object is going to be very repaint/relayout-happy.

Tests: 

Presubmits with the migration flag set to true: https://github.com/flutter/flutter/pull/147856/checks?check_run_id=24629865893
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 1, 2024
flutter/flutter@c85fa6a...7eebe29

2024-05-30 [email protected] Roll Packages from 31d3329 to 910fabb (11 revisions) (flutter/flutter#149321)
2024-05-30 [email protected] Roll Flutter Engine from fb64b9a4e6f2 to 2fedfd3cc6e5 (2 revisions) (flutter/flutter#149320)
2024-05-30 [email protected] Fix `Slider` throws an error when `_labelPainter` text is null (flutter/flutter#148462)
2024-05-30 [email protected] Roll Flutter Engine from 5500c1a3969a to fb64b9a4e6f2 (1 revision) (flutter/flutter#149307)
2024-05-30 [email protected] Enable `explicitChildNodes` for the `AlertDialog` content (flutter/flutter#149130)
2024-05-30 [email protected] Roll Flutter Engine from 0c95e85dfbf4 to 5500c1a3969a (1 revision) (flutter/flutter#149304)
2024-05-30 [email protected] Roll Flutter Engine from 19707e811b60 to 0c95e85dfbf4 (1 revision) (flutter/flutter#149300)
2024-05-30 [email protected] Roll Flutter Engine from 4adf453b6d68 to 19707e811b60 (1 revision) (flutter/flutter#149291)
2024-05-30 [email protected] disable Impeller on external texture test. (flutter/flutter#149292)
2024-05-30 [email protected] Roll Flutter Engine from 8d5d14a1db95 to 4adf453b6d68 (12 revisions) (flutter/flutter#149290)
2024-05-30 [email protected] Update 3.22.1 release notes to include missing fix. (flutter/flutter#148999)
2024-05-30 [email protected] Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (flutter/flutter#149263)
2024-05-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Prevent LayoutBuilder from rebuilding more than once (#147856)" (flutter/flutter#149279)
2024-05-29 [email protected] Unskip expression evaluation test (flutter/flutter#149253)
2024-05-29 [email protected] temporarily disable SemanticsAction tests to unblock engine change (flutter/flutter#149274)
2024-05-29 [email protected] Adds benchmark for rrect_blur. (flutter/flutter#149261)
2024-05-29 [email protected] Prevent LayoutBuilder from rebuilding more than once (flutter/flutter#147856)
2024-05-29 [email protected] Add test for inherited_theme.0.dart (flutter/flutter#149120)
2024-05-29 [email protected] Update progress_indicator.dart to indicate the adaptive option is for both macOS and iOS (flutter/flutter#145246)
2024-05-29 [email protected] _ModalScopeStatus as InheritedModel (flutter/flutter#149022)
2024-05-29 [email protected] Add test for radio.toggleable.0.dart (flutter/flutter#149153)
2024-05-29 [email protected] Add a sentinel value for `TextStyle.height` (flutter/flutter#149049)
2024-05-29 [email protected] Remove dynamic_layouts from issue template (flutter/flutter#149252)
2024-05-29 [email protected] Roll Flutter Engine from 30aa720d4999 to 60968ee3bde7 (1 revision) (flutter/flutter#149255)
2024-05-29 [email protected] Roll Flutter Engine from b26e1b023cdb to 30aa720d4999 (7 revisions) (flutter/flutter#149249)
2024-05-29 [email protected] Roll Packages from a933c30 to 31d3329 (6 revisions) (flutter/flutter#149246)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants