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

Skip to content

wasm_release builds do not work with --no-prebuilt-dart-sdk #119513

Closed
@whesse

Description

@whesse

The PR flutter/engine#38448 , [web] Build multiple CanvasKit variants (using toolchain_args), has broken building without a prebuilt Dart SDK.

The gn command

python3 flutter/tools/gn --runtime-mode release --no-prebuilt-dart-sdk --web

now gives an error because it tries to copy from the prebuilt Dart SDK location. This is in the target

See //flutter/build/dart/BUILD.gn:21:3: whence it was called.
copy_trees("_copy_trees") {

Probably because of the change to run the CanvasKit build using a separate toolchain, and not using the args passed to gn,
the flutter_prebuilt_dart_sdk flag seems to be true when this target is hit from the CanvasKit build.

To reproduce the error, you need to delete the downloaded prebuilts from src/flutter/prebuilts.

This breaks all flutter tools on builds created from a tip-of-tree Dart or a tryjob with a patched Dart, such as the monorepo builds running on the Dart CI, now that the flutter tools download the platform-independent canvaskit. We cannot build and upload this canvaskit because the host-wasm build cannot run without a prebuilt Dart SDK.

@mdebbar @zanderso @hterkelsen @jason-simmons @godofredoc

Metadata

Metadata

Labels

e: wasmIssues related to the wasm build of Flutter Web.platform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions