Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@stereotype441
Copy link
Contributor

@stereotype441 stereotype441 commented Jul 24, 2023

Some parts of the flutter engine are built using the latest version of the Dart SDK, ignoring SDK constraints in pubspec.yaml files. Therefore, before the Dart SDK can switch on the "private field promotion" feature (dart-lang/language#2020), these parts of the flutter engine need to be modified so that they won't have any "unnecessary !" warnings after field private field promotion is enabled. This PR makes the necessary changes.

This PR doesn't introduce any functional change. In principle it might improve performance slightly (by avoiding redundant memory accesses), but in practice the difference is unlikely to rise out of the measurement noise.

Issue fixed by this PR: flutter/flutter#131198

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@stereotype441 stereotype441 requested a review from goderbauer July 24, 2023 16:04
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jul 24, 2023
Copy link
Contributor

@jonahwilliams jonahwilliams 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

@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

// later used to fix the parent-child and sibling relationships between
// objects.
for (final SemanticsNodeUpdate nodeUpdate in update._nodeUpdates!) {
final List<SemanticsNodeUpdate> nodeUpdates = update._nodeUpdates!;
Copy link
Contributor

Choose a reason for hiding this comment

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

please add an assert where the nodeUpdates variable goes out of scope that verifies that update._nodeUpdates has not changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Hixie
Copy link
Contributor

Hixie commented Jul 24, 2023

test-exempt: code refactor with no semantic change

@goderbauer
Copy link
Member

@jonahwilliams (engine sherif) do you know what's up with the "Linux Fuchsia FEMU" check? It keeps timing out.

@jonahwilliams
Copy link
Contributor

I do not. I'm going to click rebase just in case, but I don't see this happening elsewhere so hopefully its just a flake...

@stereotype441
Copy link
Contributor Author

I do not. I'm going to click rebase just in case, but I don't see this happening elsewhere so hopefully its just a flake...

Thanks, Jonah! It looks like everything is working now.

@stereotype441 stereotype441 added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 25, 2023
@auto-submit auto-submit bot merged commit faf507a into flutter:main Jul 26, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 26, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 26, 2023
…131309)

flutter/engine@db711f1...7f3b0d6

2023-07-26 [email protected] Roll fallback fonts. (flutter/engine#44000)
2023-07-26 [email protected] Roll Skia from 12d41b6f66ed to 28773cec6e8d (2 revisions) (flutter/engine#44011)
2023-07-26 [email protected] Prepare flutter engine for enabling private final field promotion. (flutter/engine#43959)
2023-07-26 [email protected] Manual roll Dart SDK from 61ab5422fb7b to b1e82e2e55b2 (3 revisions) (flutter/engine#44018)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
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 Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@stereotype441 stereotype441 deleted the b-2020-127 branch July 26, 2023 09:11
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…lutter#131309)

flutter/engine@db711f1...7f3b0d6

2023-07-26 [email protected] Roll fallback fonts. (flutter/engine#44000)
2023-07-26 [email protected] Roll Skia from 12d41b6f66ed to 28773cec6e8d (2 revisions) (flutter/engine#44011)
2023-07-26 [email protected] Prepare flutter engine for enabling private final field promotion. (flutter/engine#43959)
2023-07-26 [email protected] Manual roll Dart SDK from 61ab5422fb7b to b1e82e2e55b2 (3 revisions) (flutter/engine#44018)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
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 Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
…lutter#131309)

flutter/engine@db711f1...7f3b0d6

2023-07-26 [email protected] Roll fallback fonts. (flutter/engine#44000)
2023-07-26 [email protected] Roll Skia from 12d41b6f66ed to 28773cec6e8d (2 revisions) (flutter/engine#44011)
2023-07-26 [email protected] Prepare flutter engine for enabling private final field promotion. (flutter/engine#43959)
2023-07-26 [email protected] Manual roll Dart SDK from 61ab5422fb7b to b1e82e2e55b2 (3 revisions) (flutter/engine#44018)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
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 Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…lutter#43959)

Some parts of the flutter engine are built using the latest version of the Dart SDK, ignoring SDK constraints in `pubspec.yaml` files. Therefore, before the Dart SDK can switch on the "private field promotion" feature (dart-lang/language#2020), these parts of the flutter engine need to be modified so that they won't have any "unnecessary `!`" warnings after field private field promotion is enabled. This PR makes the necessary changes.

This PR doesn't introduce any functional change. In principle it might improve performance slightly (by avoiding redundant memory accesses), but in practice the difference is unlikely to rise out of the measurement noise.

Issue fixed by this PR: flutter/flutter#131198

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants