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

Conversation

@zanderso
Copy link
Member

Fix for previous commit #46440

@zanderso zanderso requested review from aam and jason-simmons October 12, 2023 17:49
@zanderso zanderso changed the title Fix --no-prebuilt-dart-sdk-build Fix --no-prebuilt-dart-sdk build Oct 12, 2023
@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 12, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 12, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 12, 2023

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

@jason-simmons
Copy link
Member

I had started looking at this, and IIUC the packages parameter in dart_action will add a --packages flag to the Dart command line (making it redundant with packages_args.

So I'd suggest:

  • remove packages_args
  • for the prebuilt Dart SDK case, add the packages file to inputs and the --packages flag to args if package_config is defined
  • for the non-prebuilt case, set the packages parameter in dart_action

@jason-simmons
Copy link
Member

Also, after applying the fix I'm still seeing errors when configuring an Android build with --no-prebuilt-dart-sdk:

ERROR Unresolved dependencies.
//flutter/flutter_frontend_server:frontend_server(//build/toolchain/android:clang_arm)
  needs //flutter/build/dart:dart_sdk(//build/toolchain/android:clang_arm)

@zanderso zanderso force-pushed the fix-no-prebuilt-dart-sdk branch from 641c475 to bad615b Compare October 12, 2023 19:37
@zanderso
Copy link
Member Author

@jason-simmons Good catch. I've updated the PR.

deps = common_deps
pool = "//flutter/build/dart:dart_pool"
script = "$root_gen_dir/frontend_server.dart.snapshot"
packages = rebase_path(invoker.package_config)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is redundant with the logic above in all cases.

@jason-simmons
Copy link
Member

With this patch I'm still seeing errors when building a 32-bit android_debug_unopt target on an x64 host.

When it builds the scenario app snapshot, the frontend server fails with:

output: VM initialization failed: JIT cannot simulate target architecture with different word size than host

@zanderso zanderso force-pushed the fix-no-prebuilt-dart-sdk branch from bad615b to 971c37b Compare October 13, 2023 01:54
@zanderso
Copy link
Member Author

It turns out that when not using the prebuilt Dart SDK, we were previously running the frontend server from source. I've updated this patch to go back to that behavior. Thanks, Jason!

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #46842 at sha 971c37b

@zanderso
Copy link
Member Author

Will merge this into the reland of #46863

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants