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

Conversation

@zanderso
Copy link
Member

@zanderso zanderso commented Mar 9, 2024

Part of flutter/flutter#144430

From gn help inputs: "It may be tempting to write a script that enumerates all files in a directory
as inputs. Don't do this!"

@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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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 Mar 9, 2024
@zanderso
Copy link
Member Author

zanderso commented Mar 9, 2024

@eyebrowsoffire @yjbanov The goal is for this to be a refactoring without a semantic change. Would existing tests fail if I got this wrong?

script = "//flutter/web_sdk/sdk_rewriter.dart"
inputs = source_dart_files + [ script ]

#inputs = source_dart_files + [ script ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed. Thanks.

String pathSuffix = inputFilePath.substring(inputDirectoryPath.length);

final List<String> inputFiles = <String>[];
final List<FileSystemEntity> entries = Directory(inputDirectoryPath).listSync(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming enumerating files in Dart is faster than in gn?

Copy link
Member Author

Choose a reason for hiding this comment

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

It may or may not be (though my guess is that this is faster in Dart than Python). The advantage of moving the directory listing here is that instead of happening unconditionally on every GN invocation, it will only happen when the target needs to be rebuilt during the build, and when it is rebuilt it will be in parallel with the rest of the build, rather than as the long-pole of the GN step.

@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 11, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 11, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 11, 2024

auto label is removed for flutter/engine/51314, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 11, 2024
@auto-submit auto-submit bot merged commit eac124e into flutter:main Mar 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 12, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 12, 2024
…ions) (#145002)

Manual roll requested by [email protected]

flutter/engine@6cefbe1...6771307

2024-03-11 [email protected] [web] Split initialization of the _flutter namespace and loader object. (flutter/engine#51294)
2024-03-11 [email protected] Roll Dart SDK from 09a1a1ede1c4 to 7a2c94fd0a26 (1 revision) (flutter/engine#51338)
2024-03-11 [email protected] Roll Skia from 6f10903e2d28 to 32f1cb50734a (5 revisions) (flutter/engine#51331)
2024-03-11 [email protected] Make scenario app have translucent splash screen so it doesn't affect screenshot colors (flutter/engine#51329)
2024-03-11 [email protected] [gn] Change sdk_rewriter() template to use depfiles (flutter/engine#51314)

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://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
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.

3 participants