Thanks to visit codestin.com
Credit goes to github.com

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

Felt should use arm64 dart sdk and arm64 Chromium when on arm Macs #36336

Merged
merged 10 commits into from
Sep 23, 2022

Conversation

eyebrowsoffire
Copy link
Contributor

@eyebrowsoffire eyebrowsoffire commented Sep 21, 2022

This fixes flutter/flutter#110113

Rather than building the dart sdk in a separate step in order to run felt.dart itself, just use the dart sdk prebuilts. Also, the user can just pass in DART_SDK_DIR as an environment variable if a custom built dart sdk is needed. The prebuilt we actually use now actually matches the architecture of the system, so on an arm Mac we actually use arm64 SDK.

This is good, because now we can actually detect whether we are on arm, and download the right version of Chromium for tests. Added a new Chromium browser platform, and bumped all the versions of Chromium to more recent versions. This is also helpful for the upcoming WASM stuff, which requires some bleeding edge features in V8. If this is too new, let me know and we can pull back to an earlier build, and I can push it forward again when all the WASM unit testing stuff is done.

I also added a FELT_DEBUG=1 environment variable that make the felt process itself debuggable and pauses it on start.

@eyebrowsoffire eyebrowsoffire added the Work in progress (WIP) Not ready (yet) for review! label Sep 21, 2022
@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.

@flutter-dashboard flutter-dashboard bot added platform-web Code specifically for the web engine needs tests labels Sep 21, 2022
@eyebrowsoffire
Copy link
Contributor Author

Two things that I may need some help with on this PR:

  1. Windows. felt.bat probably needs to be updated, and I don't have a Windows machine to test.
  2. The browser roller. I'm not super clear on the structure of the CIPD repackaging process, so I could use some guidance here.

exit 1
fi

echo "Running felt with prebuilt Dart SDK at ${DART_SDK_DIR}..."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: for a tool that's used multiple times daily I prefer minimizing the amount of printed stuff when things are running along the happy path. The closer we are to cp the better. We could have a verbose flag that would output more. Perhaps we should also output more when running on LUCI (I believe there's already a flag for that).

Mac: 1046592
Mac_Arm: 1046589
Win: 1046600
version: '107.0' # CIPD tag for the above Build IDs. Normally "ChromeMajorVersion.UploadAttempt". ;)
Copy link
Contributor

@yjbanov yjbanov Sep 22, 2022

Choose a reason for hiding this comment

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

What do you think of introducing a new variant (can be Linux-only for now) for a more recent Chromium? Similar to Mac/Mac_Arm we could have Linux/Linux_Canary. We wanted to be able to run on stable and on the upcoming versions of Chromium for a while now so we could alert the Chromium project about any incoming regressions. That should meet the needs for the WasmGC experiment, or any future features we're experimenting with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That won't work with this current setup, because the version number is the same for all platforms. In general, I feel like the definition of one "platform" being ahead version-wise is confusing and counter-intuitive. I think having support for running on non-stable versions is probably a little out of scope for this particular change. I've made a change to push us back to 105.0, which is the stable version of Chrome. I might augment this a bit more for the wasm changes in a subsequent PR, if 107 is still too new by the time I want to merge the wasm harness stuff.

@@ -91,11 +92,13 @@ class GnPipelineStep extends ProcessStep {
Future<ProcessManager> createProcess() {
print('Running gn for $target...');
final List<String> gnArgs = <String>[];
final bool isMacosArm = ffi.Abi.current() == ffi.Abi.macosArm64;
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that this check is performed in several places, should we add a utility boolean isMacosArm instead of importing dart:ffi everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's a good idea.

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 8.
View them at https://flutter-engine-gold.skia.org/cl/github/36336

@eyebrowsoffire eyebrowsoffire removed the Work in progress (WIP) Not ready (yet) for review! label Sep 23, 2022
@skia-gold
Copy link

Gold has detected about 4 new digest(s) on patchset 10.
View them at https://flutter-engine-gold.skia.org/cl/github/36336

@Hixie
Copy link
Contributor

Hixie commented Sep 23, 2022

test-exempt: part of CI

That said, this is probably testable if you want to test it anyway. :-)

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 23, 2022
@auto-submit auto-submit bot merged commit 2604b18 into flutter:main Sep 23, 2022
@eyebrowsoffire eyebrowsoffire deleted the felt_arm64 branch September 23, 2022 20:11
@eyebrowsoffire eyebrowsoffire restored the felt_arm64 branch September 23, 2022 20:11
@eyebrowsoffire eyebrowsoffire deleted the felt_arm64 branch September 23, 2022 20:11
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 23, 2022
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 needs tests platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow web Chrome tests to run on arm64 Macs
5 participants