From 048ee12c073f32a109d2c3a28b7e7062902d94e1 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Mon, 11 Mar 2024 10:24:19 -0700 Subject: [PATCH] Move emscripten out of the buildroot into the flutter repo. (flutter/engine#51299) This migrates the emscripten toolchain into the flutter repo, as well as the fonts for web unit tests. Also, removed the `web_dependencies` thing which is no longer used. This fixes https://github.com/flutter/flutter/issues/143332 Depends on a buildroot change here: https://github.com/flutter/buildroot/pull/833 --- DEPS | 16 +++------------- .../flutter/ci/licenses_golden/excluded_files | 3 +-- .../flutter/ci/licenses_golden/tool_signature | 2 +- .../lib/web_ui/dev/roll_fallback_fonts.dart | 2 +- .../web_ui/dev/steps/copy_artifacts_step.dart | 1 + engine/src/flutter/tools/activate_emsdk.py | 2 +- engine/src/flutter/tools/licenses/lib/paths.dart | 3 +-- 7 files changed, 9 insertions(+), 20 deletions(-) diff --git a/DEPS b/DEPS index e3db992152..b0b4c1b5b9 100644 --- a/DEPS +++ b/DEPS @@ -283,7 +283,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'e9df434539745202fa5f9b729fe5f82e5de3f025', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'b1fdfb2c98dfb6270c3ce83e67832e56d10865e6', 'src/flutter/third_party/depot_tools': Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', @@ -789,16 +789,6 @@ deps = { 'dep_type': 'cipd', }, - 'src/third_party/web_dependencies': { - 'packages': [ - { - 'package': 'flutter/web/canvaskit_bundle', - 'version': Var('canvaskit_cipd_instance') - } - ], - 'dep_type': 'cipd', - }, - 'src/third_party/java/openjdk': { 'packages': [ { @@ -829,7 +819,7 @@ deps = { 'dep_type': 'cipd', }, - 'src/buildtools/emsdk': { + 'src/flutter/prebuilts/emsdk': { 'url': Var('skia_git') + '/external/github.com/emscripten-core/emsdk.git' + '@' + 'a896e3d066448b3530dbcaa48869fafefd738f57', 'condition': 'download_emsdk', }, @@ -1055,7 +1045,7 @@ deps = { 'dep_type': 'cipd', }, - 'src/third_party/google_fonts_for_unit_tests': { + 'src/flutter/third_party/google_fonts_for_unit_tests': { 'packages': [ { 'package': 'flutter/flutter_font_fallbacks', diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index cf422f0f64..14507743d0 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -1541,6 +1541,7 @@ ../../../flutter/third_party/glfw/src/CMakeLists.txt ../../../flutter/third_party/glfw/tests ../../../flutter/third_party/gn +../../../flutter/third_party/google_fonts_for_unit_tests ../../../flutter/third_party/googletest ../../../flutter/third_party/gtest-parallel/.git ../../../flutter/third_party/gtest-parallel/.gitignore @@ -3130,7 +3131,6 @@ ../../../third_party/dart/utils/OWNERS ../../../third_party/dart/utils/compiler/.gitignore ../../../third_party/dart/utils/dartanalyzer/.gitignore -../../../third_party/google_fonts_for_unit_tests ../../../third_party/gradle ../../../third_party/java ../../../third_party/libcxx/.clang-format @@ -3310,7 +3310,6 @@ ../../../third_party/perfetto/ui/src/plugins/dev.perfetto.AndroidPerf/OWNERS ../../../third_party/perfetto/ui/src/plugins/dev.perfetto.LargeScreensPerf/OWNERS ../../../third_party/perfetto/ui/src/test -../../../third_party/web_dependencies/canvaskit ../../../third_party/zlib/.git ../../../third_party/zlib/CMakeLists.txt ../../../third_party/zlib/DIR_METADATA diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 375dde35c8..15d63ed866 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 6d4a7215ee5679ace5ae272f414246bb +Signature: 46b0db75dff939f8b39145a50f827d47 diff --git a/engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart b/engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart index a281138009..5981e28d62 100644 --- a/engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart +++ b/engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart @@ -323,7 +323,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE. ); await runProcess('gclient', [ 'setdep', - '--revision=src/third_party/google_fonts_for_unit_tests:$packageName@$versionString', + '--revision=src/flutter/third_party/google_fonts_for_unit_tests:$packageName@$versionString', '--deps-file=$depFilePath' ]); } diff --git a/engine/src/flutter/lib/web_ui/dev/steps/copy_artifacts_step.dart b/engine/src/flutter/lib/web_ui/dev/steps/copy_artifacts_step.dart index b02f6f49e4..7c7293bbd5 100644 --- a/engine/src/flutter/lib/web_ui/dev/steps/copy_artifacts_step.dart +++ b/engine/src/flutter/lib/web_ui/dev/steps/copy_artifacts_step.dart @@ -105,6 +105,7 @@ class CopyArtifactsStep implements PipelineStep { final io.Directory fallbackFontsSource = io.Directory(pathlib.join( environment.engineSrcDir.path, + 'flutter', 'third_party', 'google_fonts_for_unit_tests', )); diff --git a/engine/src/flutter/tools/activate_emsdk.py b/engine/src/flutter/tools/activate_emsdk.py index 11d0f302dd..64219942a4 100644 --- a/engine/src/flutter/tools/activate_emsdk.py +++ b/engine/src/flutter/tools/activate_emsdk.py @@ -9,7 +9,7 @@ import os import subprocess import sys -EMSDK_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'buildtools', 'emsdk')) +EMSDK_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', 'prebuilts', 'emsdk')) EMSDK_PATH = os.path.join(EMSDK_ROOT, 'emsdk.py') diff --git a/engine/src/flutter/tools/licenses/lib/paths.dart b/engine/src/flutter/tools/licenses/lib/paths.dart index 4f40ef3c8e..c3bcb0f653 100644 --- a/engine/src/flutter/tools/licenses/lib/paths.dart +++ b/engine/src/flutter/tools/licenses/lib/paths.dart @@ -63,6 +63,7 @@ final Set skippedPaths = { r'flutter/third_party/glfw/deps', // Only used by examples and tests; not linked in build. r'flutter/third_party/glfw/docs', r'flutter/third_party/gn', + r'flutter/third_party/google_fonts_for_unit_tests', // only used in web unit tests r'flutter/third_party/harfbuzz/docs', r'flutter/third_party/harfbuzz/util', // utils are command line tools that do not end up in the binary r'flutter/third_party/icu/filters', @@ -198,7 +199,6 @@ final Set skippedPaths = { r'third_party/dart/third_party/pkg_tested', r'third_party/dart/third_party/requirejs', // only used by DDC r'third_party/dart/tools', // not shipped in binary - r'third_party/google_fonts_for_unit_tests', // only used in web unit tests r'third_party/gradle', r'third_party/java', // only used for Android builds r'third_party/libcxx/benchmarks', @@ -217,7 +217,6 @@ final Set skippedPaths = { r'third_party/perfetto/src/trace_processor', // contains nothing that ends up in the binary executable r'third_party/perfetto/src/traced', // contains nothing that ends up in the binary executable r'third_party/perfetto/src/tracing', // contains nothing that ends up in the binary executable - r'third_party/web_dependencies/canvaskit', // redundant; covered by Skia dependencies r'third_party/zlib/contrib/minizip/miniunz.c', // sample file r'third_party/zlib/contrib/minizip/minizip.c', // sample file r'tools', // not distributed in binary