From 233c644b0cac2f83d49aeaa21719b0a1e0a8b963 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Tue, 6 Aug 2024 14:29:01 -0700 Subject: [PATCH 01/50] chore: squash all our changes to a single commit See shorebird/dev-3.24.5 for prior commit history. --- BUILD.gn | 27 +- DEPS | 339 +++++++++--------- build/archives/BUILD.gn | 18 +- lib/snapshot/BUILD.gn | 26 +- runtime/dart_snapshot.cc | 105 ++++-- shell/common/BUILD.gn | 13 + shell/common/shell.cc | 10 + shell/common/shorebird/BUILD.gn | 56 +++ shell/common/shorebird/shorebird.cc | 223 ++++++++++++ shell/common/shorebird/shorebird.h | 21 ++ .../common/shorebird/snapshots_data_handle.cc | 144 ++++++++ .../common/shorebird/snapshots_data_handle.h | 47 +++ .../snapshots_data_handle_unittests.cc | 177 +++++++++ shell/platform/android/BUILD.gn | 44 ++- shell/platform/android/android_exports.lst | 10 + shell/platform/android/flutter_main.cc | 21 +- shell/platform/android/flutter_main.h | 3 + .../flutter/embedding/engine/FlutterJNI.java | 48 ++- shell/platform/darwin/ios/BUILD.gn | 14 + .../framework/Source/FlutterDartProject.mm | 33 ++ .../framework/Source/FlutterViewController.mm | 4 + shell/platform/darwin/macos/BUILD.gn | 1 + .../macos/framework/Source/FlutterEngine.mm | 23 ++ shell/platform/embedder/BUILD.gn | 1 + shell/platform/embedder/embedder.cc | 10 + shell/platform/embedder/embedder.h | 39 ++ shell/platform/windows/platform_handler.cc | 8 +- shell/testing/BUILD.gn | 1 + sky/tools/create_full_ios_framework.py | 300 ++++++++++++++++ testing/run_tests.py | 1 + 30 files changed, 1563 insertions(+), 204 deletions(-) create mode 100644 shell/common/shorebird/BUILD.gn create mode 100644 shell/common/shorebird/shorebird.cc create mode 100644 shell/common/shorebird/shorebird.h create mode 100644 shell/common/shorebird/snapshots_data_handle.cc create mode 100644 shell/common/shorebird/snapshots_data_handle.h create mode 100644 shell/common/shorebird/snapshots_data_handle_unittests.cc create mode 100644 sky/tools/create_full_ios_framework.py diff --git a/BUILD.gn b/BUILD.gn index bb2ab9ba0f534..ea94699b54971 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -112,14 +112,10 @@ group("flutter") { # path_ops "//flutter/tools/path_ops", - ] - if (host_os == "linux") { - public_deps += [ - # Built alongside gen_snapshot for 64 bit targets - "$dart_src/runtime/bin:analyze_snapshot", - ] - } + # Built alongside gen_snapshot arm64 targets. + "$dart_src/runtime/bin:analyze_snapshot", + ] if (full_dart_sdk) { public_deps += [ "//flutter/web_sdk" ] @@ -193,6 +189,7 @@ group("unittests") { "//flutter/runtime:no_dart_plugin_registrant_unittests", "//flutter/runtime:runtime_unittests", "//flutter/shell/common:shell_unittests", + "//flutter/shell/common/shorebird:shorebird_unittests", "//flutter/shell/platform/embedder:embedder_a11y_unittests", "//flutter/shell/platform/embedder:embedder_proctable_unittests", "//flutter/shell/platform/embedder:embedder_unittests", @@ -319,3 +316,19 @@ if (host_os == "win") { outputs = [ "$root_build_dir/gen_snapshot/gen_snapshot.exe" ] } } + +# A top-level target for analyze_snapshot, modeled after the gen_snapshot +# target above. +if (host_os == "win") { + _analyze_snapshot_target = + "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" + + copy("analyze_snapshot") { + deps = [ _analyze_snapshot_target ] + + analyze_snapshot_out_dir = + get_label_info(_analyze_snapshot_target, "root_out_dir") + sources = [ "$analyze_snapshot_out_dir/analyze_snapshot.exe" ] + outputs = [ "$root_build_dir/analyze_snapshot/analyze_snapshot.exe" ] + } +} diff --git a/DEPS b/DEPS index eb091429de1f3..3d8f8fb1d2fcb 100644 --- a/DEPS +++ b/DEPS @@ -15,6 +15,10 @@ vars = { 'skia_git': 'https://skia.googlesource.com', 'llvm_git': 'https://llvm.googlesource.com', 'skia_revision': '6062afaa505bf7e6c727a20cafe4c7bee0f02df8', + "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", + "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", + "updater_git": "https://github.com/shorebirdtech/updater.git", + "updater_rev": "1e4efce65f28d54c7a806ea05defd2ca3eb94595", # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. @@ -258,22 +262,20 @@ vars = { 'fuchsia_gn_sdk_version': 'tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC', } -gclient_gn_args_file = 'src/flutter/third_party/dart/build/config/gclient_args.gni' -gclient_gn_args = [ - 'checkout_llvm' -] +gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" +gclient_gn_args = ["checkout_llvm"] # Only these hosts are allowed for dependencies in this DEPS file. # If you need to add a new host, contact chrome infrastructure team. allowed_hosts = [ - 'boringssl.googlesource.com', - 'chrome-infra-packages.appspot.com', - 'chromium.googlesource.com', - 'dart.googlesource.com', - 'flutter.googlesource.com', - 'llvm.googlesource.com', - 'skia.googlesource.com', - 'swiftshader.googlesource.com', + "boringssl.googlesource.com", + "chrome-infra-packages.appspot.com", + "chromium.googlesource.com", + "dart.googlesource.com", + "flutter.googlesource.com", + "llvm.googlesource.com", + "skia.googlesource.com", + "swiftshader.googlesource.com", ] deps = { @@ -339,7 +341,7 @@ deps = { # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), 'src/flutter/third_party/dart': - Var('dart_git') + '/sdk.git' + '@' + Var('dart_revision'), + Var('dart_sdk_git') + '@' + Var('dart_sdk_revision'), # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. @@ -632,6 +634,9 @@ deps = { 'src/flutter/third_party/ocmock': Var('flutter_git') + '/third_party/ocmock' + '@' + Var('ocmock_rev'), + 'src/third_party/updater': + Var('updater_git') + '@' + Var('updater_rev'), + 'src/flutter/third_party/libjpeg-turbo/src': Var('flutter_git') + '/third_party/libjpeg-turbo' + '@' + '0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f', @@ -1018,157 +1023,165 @@ deps = { } recursedeps = [ - 'src/flutter/third_party/vulkan-deps', + "src/flutter/third_party/vulkan-deps", ] hooks = [ - { - # Generate the Dart SDK's .dart_tool/package_confg.json file. - 'name': 'Generate .dart_tool/package_confg.json', - 'pattern': '.', - 'action': ['python3', 'src/flutter/third_party/dart/tools/generate_package_config.py'], - }, - { - # Generate the sdk/version file. - 'name': 'Generate sdk/version', - 'pattern': '.', - 'action': ['python3', 'src/flutter/third_party/dart/tools/generate_sdk_version_file.py'], - }, - { - # Update the Windows toolchain if necessary. - 'name': 'win_toolchain', - 'condition': 'download_windows_deps', - 'pattern': '.', - 'action': ['python3', 'src/build/vs_toolchain.py', 'update'], - }, - { - 'name': 'dia_dll', - 'pattern': '.', - 'condition': 'download_windows_deps', - 'action': [ - 'python3', - 'src/flutter/tools/dia_dll.py', - ], - }, - { - 'name': 'linux_sysroot_x64', - 'pattern': '.', - 'condition': 'download_linux_deps', - 'action': [ - 'python3', - 'src/build/linux/sysroot_scripts/install-sysroot.py', - '--arch=x64'], - }, - { - 'name': 'linux_sysroot_arm64', - 'pattern': '.', - 'condition': 'download_linux_deps', - 'action': [ - 'python3', - 'src/build/linux/sysroot_scripts/install-sysroot.py', - '--arch=arm64'], - }, - { - 'name': 'pub get --offline', - 'pattern': '.', - 'action': [ - 'python3', - 'src/flutter/tools/pub_get_offline.py', - ] - }, - { - 'name': 'Download Fuchsia SDK', - 'pattern': '.', - 'condition': 'download_fuchsia_deps and download_fuchsia_sdk', - 'action': [ - 'python3', - 'src/flutter/tools/download_fuchsia_sdk.py', - '--fail-loudly', - '--verbose', - '--host-os', - Var('host_os'), - '--fuchsia-sdk-path', - Var('fuchsia_sdk_path'), - ] - }, - { - 'name': 'Activate Emscripten SDK', - 'pattern': '.', - 'condition': 'download_emsdk', - 'action': [ - 'python3', - 'src/flutter/tools/activate_emsdk.py', - ] - }, - { - 'name': 'Setup githooks', - 'pattern': '.', - 'condition': 'setup_githooks', - 'action': [ - 'python3', - 'src/flutter/tools/githooks/setup.py', - ] - }, - { - 'name': 'impeller-cmake-example submodules', - 'pattern': '.', - 'condition': 'download_impeller_cmake_example', - 'action': [ - 'python3', - 'src/flutter/ci/impeller_cmake_build_test.py', - '--path', - 'flutter/third_party/impeller-cmake-example', - '--setup', - ] - }, - { - 'name': 'Download Fuchsia system images', - 'pattern': '.', - 'condition': 'run_fuchsia_emu', - 'action': [ - 'env', - 'DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}', - 'FUCHSIA_SDK_PATH={fuchsia_sdk_path}', - 'python3', - 'src/flutter/tools/fuchsia/with_envs.py', - 'src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py', - 'terminal.x64,terminal.qemu-arm64', - ] - }, - # The following two scripts check if they are running in the LUCI - # environment, and do nothing if so. This is because Xcode is not yet - # installed in CI when these hooks are run. - { - 'name': 'Find the iOS device SDKs', - 'pattern': '.', - 'condition': 'host_os == "mac"', - 'action': [ - 'python3', - 'src/build/config/ios/ios_sdk.py', - # This cleans up entries under flutter/prebuilts for this script and the - # following script. - '--as-gclient-hook' - ] - }, - { - 'name': 'Find the macOS SDK', - 'pattern': '.', - 'condition': 'host_os == "mac"', - 'action': [ - 'python3', - 'src/build/mac/find_sdk.py', - '--as-gclient-hook', - Var('mac_sdk_min') - ] - }, - { - 'name': 'Generate Fuchsia GN build rules', - 'pattern': '.', - 'condition': 'download_fuchsia_deps', - 'action': [ - 'python3', - 'src/flutter/tools/fuchsia/with_envs.py', - 'src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py', - ], - }, + { + # Generate the Dart SDK's .dart_tool/package_confg.json file. + "name": "Generate .dart_tool/package_confg.json", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_package_config.py", + ], + }, + { + # Generate the sdk/version file. + "name": "Generate sdk/version", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_sdk_version_file.py", + ], + }, + { + # Update the Windows toolchain if necessary. + "name": "win_toolchain", + "condition": "download_windows_deps", + "pattern": ".", + "action": ["python3", "src/build/vs_toolchain.py", "update"], + }, + { + "name": "dia_dll", + "pattern": ".", + "condition": "download_windows_deps", + "action": [ + "python3", + "src/flutter/tools/dia_dll.py", + ], + }, + { + "name": "linux_sysroot_x64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=x64", + ], + }, + { + "name": "linux_sysroot_arm64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=arm64", + ], + }, + { + "name": "pub get --offline", + "pattern": ".", + "action": [ + "python3", + "src/flutter/tools/pub_get_offline.py", + ], + }, + { + "name": "Download Fuchsia SDK", + "pattern": ".", + "condition": "download_fuchsia_deps and download_fuchsia_sdk", + "action": [ + "python3", + "src/flutter/tools/download_fuchsia_sdk.py", + "--fail-loudly", + "--verbose", + "--host-os", + Var("host_os"), + "--fuchsia-sdk-path", + Var("fuchsia_sdk_path"), + ], + }, + { + "name": "Activate Emscripten SDK", + "pattern": ".", + "condition": "download_emsdk", + "action": [ + "python3", + "src/flutter/tools/activate_emsdk.py", + ], + }, + { + "name": "Setup githooks", + "pattern": ".", + "condition": "setup_githooks", + "action": [ + "python3", + "src/flutter/tools/githooks/setup.py", + ], + }, + { + "name": "impeller-cmake-example submodules", + "pattern": ".", + "condition": "download_impeller_cmake_example", + "action": [ + "python3", + "src/flutter/ci/impeller_cmake_build_test.py", + "--path", + "flutter/third_party/impeller-cmake-example", + "--setup", + ], + }, + { + "name": "Download Fuchsia system images", + "pattern": ".", + "condition": "run_fuchsia_emu", + "action": [ + "env", + "DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}", + "FUCHSIA_SDK_PATH={fuchsia_sdk_path}", + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py", + "terminal.x64,terminal.qemu-arm64", + ], + }, + # The following two scripts check if they are running in the LUCI + # environment, and do nothing if so. This is because Xcode is not yet + # installed in CI when these hooks are run. + { + "name": "Find the iOS device SDKs", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/config/ios/ios_sdk.py", + # This cleans up entries under flutter/prebuilts for this script and the + # following script. + "--as-gclient-hook", + ], + }, + { + "name": "Find the macOS SDK", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/mac/find_sdk.py", + "--as-gclient-hook", + Var("mac_sdk_min"), + ], + }, + { + "name": "Generate Fuchsia GN build rules", + "pattern": ".", + "condition": "download_fuchsia_deps", + "action": [ + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py", + ], + }, ] diff --git a/build/archives/BUILD.gn b/build/archives/BUILD.gn index 97d9483a23aba..8082f7d199f06 100644 --- a/build/archives/BUILD.gn +++ b/build/archives/BUILD.gn @@ -45,6 +45,7 @@ generated_file("artifacts_entitlement_config") { if (build_engine_artifacts) { zip_bundle("artifacts") { deps = [ + "$dart_src/runtime/bin:analyze_snapshot", "$dart_src/runtime/bin:gen_snapshot", "//flutter/flutter_frontend_server:frontend_server", "//flutter/impeller/compiler:impellerc", @@ -139,6 +140,10 @@ if (build_engine_artifacts) { if (host_os == "mac") { deps += [ ":artifacts_entitlement_config" ] files += [ + { + source = "$root_out_dir/analyze_snapshot$exe" + destination = "analyze_snapshot$exe" + }, { source = "$target_gen_dir/entitlements.txt" destination = "entitlements.txt" @@ -308,14 +313,25 @@ if (is_mac) { } if (host_os == "win") { + # This rule archives both gen_snapshot *and* analyze_snapshot. The name is + # misleading. We (shorebird) have updated this rule to include + # analyze_snapshot but did not update the name because it is referenced + # elsewhere in the tooling. zip_bundle("archive_win_gen_snapshot") { - deps = [ "//flutter:gen_snapshot" ] + deps = [ + "//flutter:analyze_snapshot", + "//flutter:gen_snapshot", + ] output = "$full_target_platform_name-$flutter_runtime_mode/windows-x64.zip" files = [ { source = "$root_out_dir/gen_snapshot/gen_snapshot.exe" destination = "gen_snapshot.exe" }, + { + source = "$root_out_dir/analyze_snapshot/analyze_snapshot.exe" + destination = "analyze_snapshot.exe" + }, ] } } diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 73611e45063ab..2e84d775c9578 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -37,11 +37,14 @@ group("generate_snapshot_bins") { deps += [ ":create_macos_gen_snapshots" ] } else if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { - deps += [ ":create_arm_gen_snapshot" ] + deps += [ + ":create_arm_analyze_snapshot", + ":create_arm_gen_snapshot", + ] } # Build analyze_snapshot for 64-bit target CPUs. - if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) { + if (target_cpu == "arm64") { deps += [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ] } } @@ -176,6 +179,25 @@ if (host_os == "mac" && target_os != "mac" && deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ] visibility = [ ":*" ] } + + copy("create_arm_analyze_snapshot") { + # The toolchain-specific output directory. For cross-compiles, this is a + # clang-x64 or clang-arm64 subdirectory of the top-level build directory. + host_output_dir = get_label_info( + "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)", + "root_out_dir") + + # Determine suffixed output gen_snapshot name. + target_cpu_suffix = target_cpu + if (target_cpu == "arm") { + target_cpu_suffix = "armv7" + } + + sources = [ "${host_output_dir}/analyze_snapshot" ] + outputs = [ "${host_output_dir}/analyze_snapshot_${target_cpu_suffix}" ] + deps = [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ] + visibility = [ ":*" ] + } } # Creates a `gen_snapshot` binary suffixed with the target CPU architecture. diff --git a/runtime/dart_snapshot.cc b/runtime/dart_snapshot.cc index 5943524aa9f80..1a62b3406ef3e 100644 --- a/runtime/dart_snapshot.cc +++ b/runtime/dart_snapshot.cc @@ -6,6 +6,7 @@ #include +#include #include "flutter/fml/native_library.h" #include "flutter/fml/paths.h" #include "flutter/fml/trace_event.h" @@ -56,33 +57,93 @@ static std::shared_ptr SearchMapping( const std::vector& native_library_path, const char* native_library_symbol_name, bool is_executable) { - // Ask the embedder. There is no fallback as we expect the embedders (via - // their embedding APIs) to just specify the mappings directly. - if (embedder_mapping_callback) { - // Note that mapping will be nullptr if the mapping callback returns an - // invalid mapping. If all the other methods for resolving the data also - // fail, the engine will stop with accompanying error logs. - if (auto mapping = embedder_mapping_callback()) { - return mapping; +#if FML_OS_IOS || FML_OS_MACOSX + // Detect when we're trying to load a Shorebird patch. + auto patch_path = native_library_path.front(); + bool is_patch = patch_path.find(".vmcode") != std::string::npos; + if (is_patch) { + // We use this terrible hack to load in the patch and then extract the + // symbols from it when the path is not App.framework/App but rather + // foo.vmcode, etc. We read the symbols into static variables, but then I + // believe we need to hold onto the ELF itself, otherwise the symbols + // become invalid. + // "leaked_elf" is meant to indicate that we're not freeing the ELF. + static Dart_LoadedElf* leaked_elf = nullptr; + // The VM Snapshot is identical for all binaries produced by a given version + // of Dart. Our linker checks this and will fail to link if ever the VM + // snapshot changes. + const uint8_t* ignored_vm_data = nullptr; + const uint8_t* ignored_vm_instrs = nullptr; + static const uint8_t* isolate_data = nullptr; + static const uint8_t* isolate_instrs = nullptr; + if (leaked_elf == nullptr) { + const char* error = nullptr; + // vmcode files are elf files prefixed with a shorebird linker header. + auto elf_mapping = GetFileMapping(patch_path, false /* executable */); + int elf_file_offset = Shorebird_ReadLinkHeader(elf_mapping->GetMapping(), + elf_mapping->GetSize()); + + leaked_elf = Dart_LoadELF(patch_path.c_str(), elf_file_offset, &error, + &ignored_vm_data, &ignored_vm_instrs, + &isolate_data, &isolate_instrs, + /* load as read-only, not rx */ false); + if (leaked_elf != nullptr) { + FML_LOG(INFO) << "Loaded ELF"; + } else { + FML_LOG(FATAL) << "Failed to load ELF at " << patch_path + << " error: " << error; + abort(); + } } - } - // Attempt to open file at path specified. - if (!file_path.empty()) { - if (auto file_mapping = GetFileMapping(file_path, is_executable)) { - return file_mapping; + FML_LOG(INFO) << "Loading symbol from ELF " << native_library_symbol_name; + + if (native_library_symbol_name == DartSnapshot::kIsolateDataSymbol) { + return std::make_unique(isolate_data, 0, + nullptr, true); + } else if (native_library_symbol_name == + DartSnapshot::kIsolateInstructionsSymbol) { + return std::make_unique(isolate_instrs, 0, + nullptr, true); + } + // Fall through to normal lookups for VM data and instructions. + // This fallthrough depends on the fact that NativeLibrary below can't + // read the ELF out of our .vmcode files. + } else { + // Only try to open the file if we're not loading a patch. +#endif + + // Ask the embedder. There is no fallback as we expect the embedders (via + // their embedding APIs) to just specify the mappings directly. + if (embedder_mapping_callback) { + // Note that mapping will be nullptr if the mapping callback returns an + // invalid mapping. If all the other methods for resolving the data also + // fail, the engine will stop with accompanying error logs. + if (auto mapping = embedder_mapping_callback()) { + return mapping; + } } - } - // Look in application specified native library if specified. - for (const std::string& path : native_library_path) { - auto native_library = fml::NativeLibrary::Create(path.c_str()); - auto symbol_mapping = std::make_unique( - native_library, native_library_symbol_name); - if (symbol_mapping->GetMapping() != nullptr) { - return symbol_mapping; + // Attempt to open file at path specified. + if (!file_path.empty()) { + if (auto file_mapping = GetFileMapping(file_path, is_executable)) { + return file_mapping; + } } - } + + // Look in application specified native library if specified. + for (const std::string& path : native_library_path) { + auto native_library = fml::NativeLibrary::Create(path.c_str()); + auto symbol_mapping = std::make_unique( + native_library, native_library_symbol_name); + if (symbol_mapping->GetMapping() != nullptr) { + return symbol_mapping; + } + } + +#if FML_OS_IOS || FML_OS_MACOSX + } // !is_patch +#endif // Look inside the currently loaded process. { diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 8e2d9f2174b3a..5e4b4d1f2c6f8 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -152,6 +152,8 @@ source_set("common") { "//flutter/skia", ] + include_dirs = [ "//flutter/updater" ] + if (impeller_supports_rendering) { sources += [ "snapshot_controller_impeller.cc", @@ -160,6 +162,17 @@ source_set("common") { deps += [ "//flutter/impeller" ] } + + # Needed to compile flutter_tester for macOS. + if (host_os == "mac" && target_os == "mac") { + if (target_cpu == "arm64") { + libs = [ "//third_party/updater/target/aarch64-apple-darwin/release/libupdater.a" ] + } else if (target_cpu == "x64") { + libs = [ + "//third_party/updater/target/x86_64-apple-darwin/release/libupdater.a", + ] + } + } } # These are in their own source_set to avoid a dependency cycle with //common/graphics diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 453845b3b7836..0878c020de259 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -43,6 +43,8 @@ #include "third_party/skia/include/core/SkGraphics.h" #include "third_party/tonic/common/log.h" +#include "third_party/updater/library/include/updater.h" + namespace flutter { constexpr char kSkiaChannel[] = "flutter/skia"; @@ -441,6 +443,14 @@ Shell::Shell(DartVMRef vm, is_gpu_disabled_sync_switch_(new fml::SyncSwitch(is_gpu_disabled)), weak_factory_gpu_(nullptr), weak_factory_(this) { + // FIXME: This is probably the wrong place to hook into. +#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX + if (!vm_) { + shorebird_report_launch_failure(); + } else { + shorebird_report_launch_success(); + } +#endif FML_CHECK(!settings.enable_software_rendering || !settings.enable_impeller) << "Software rendering is incompatible with Impeller."; if (!settings.enable_impeller && settings.warn_on_impeller_opt_out) { diff --git a/shell/common/shorebird/BUILD.gn b/shell/common/shorebird/BUILD.gn new file mode 100644 index 0000000000000..4e31c785af768 --- /dev/null +++ b/shell/common/shorebird/BUILD.gn @@ -0,0 +1,56 @@ +import("//flutter/common/config.gni") +import("//flutter/testing/testing.gni") + +source_set("snapshots_data_handle") { + sources = [ + "snapshots_data_handle.cc", + "snapshots_data_handle.h", + ] + + deps = [ + "//flutter/fml", + "//flutter/runtime", + "//flutter/runtime:libdart", + "//flutter/shell/common", + ] +} + +source_set("shorebird") { + sources = [ + "shorebird.cc", + "shorebird.h", + ] + + deps = [ + ":snapshots_data_handle", + "//flutter/fml", + "//flutter/runtime", + "//flutter/runtime:libdart", + "//flutter/shell/common", + "//flutter/shell/platform/embedder:embedder_headers", + ] + + include_dirs = [ "//flutter/updater" ] +} + +if (enable_unittests) { + test_fixtures("shorebird_fixtures") { + fixtures = [] + } + + executable("shorebird_unittests") { + testonly = true + + sources = [ "snapshots_data_handle_unittests.cc" ] + + # This only includes snapshots_data_handle and not shorebird because + # shorebird fails to link due to a missing updater lib. + deps = [ + ":shorebird_fixtures", + ":snapshots_data_handle", + "//flutter/runtime", + "//flutter/testing", + "//flutter/testing:fixture_test", + ] + } +} diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc new file mode 100644 index 0000000000000..a77b85414e306 --- /dev/null +++ b/shell/common/shorebird/shorebird.cc @@ -0,0 +1,223 @@ + +#include "flutter/shell/common/shorebird/shorebird.h" + +#include +#include +#include +#include +#include + +#include "flutter/fml/command_line.h" +#include "flutter/fml/file.h" +#include "flutter/fml/macros.h" +#include "flutter/fml/mapping.h" +#include "flutter/fml/message_loop.h" +#include "flutter/fml/native_library.h" +#include "flutter/fml/paths.h" +#include "flutter/fml/size.h" +#include "flutter/lib/ui/plugins/callback_cache.h" +#include "flutter/runtime/dart_snapshot.h" +#include "flutter/runtime/dart_vm.h" +#include "flutter/shell/common/shell.h" +#include "flutter/shell/common/shorebird/snapshots_data_handle.h" +#include "flutter/shell/common/switches.h" +#include "fml/logging.h" +#include "third_party/dart/runtime/include/dart_tools_api.h" + +#include "third_party/updater/library/include/updater.h" + +// Namespaced to avoid Google style warnings. +namespace flutter { + +// Old Android versions (e.g. the v16 ndk Flutter uses) don't always include a +// getauxval symbol, but the Rust ring crate assumes it exists: +// https://github.com/briansmith/ring/blob/fa25bf3a7403c9fe6458cb87bd8427be41225ca2/src/cpu/arm.rs#L22 +// It uses it to determine if the CPU supports AES instructions. +// Making this a weak symbol allows the linker to use a real version instead +// if it can find one. +// BoringSSL just reads from procfs instead, which is what we would do if +// we needed to implement this ourselves. Implementation looks straightforward: +// https://lwn.net/Articles/519085/ +// https://github.com/google/boringssl/blob/6ab4f0ae7f2db96d240eb61a5a8b4724e5a09b2f/crypto/cpu_arm_linux.c +#if defined(__ANDROID__) && defined(__arm__) +extern "C" __attribute__((weak)) unsigned long getauxval(unsigned long type) { + return 0; +} +#endif + +// TODO(eseidel): I believe we need to leak these or we'll sometimes crash +// when using the base snapshot in mixed mode. This likely will not play +// nicely with multi-engine support and will need to be refactored. +static fml::RefPtr vm_snapshot; +static fml::RefPtr isolate_snapshot; + +void SetBaseSnapshot(Settings& settings) { + // These mappings happen to be to static data in the App.framework, but + // we still need to seem to hold onto the DartSnapshot objects to keep + // the mappings alive. + vm_snapshot = DartSnapshot::VMSnapshotFromSettings(settings); + isolate_snapshot = DartSnapshot::IsolateSnapshotFromSettings(settings); + Shorebird_SetBaseSnapshots(isolate_snapshot->GetDataMapping(), + isolate_snapshot->GetInstructionsMapping(), + vm_snapshot->GetDataMapping(), + vm_snapshot->GetInstructionsMapping()); +} + +class FileCallbacksImpl { + public: + static void* Open(); + static uintptr_t Read(void* file, uint8_t* buffer, uintptr_t length); + static int64_t Seek(void* file, int64_t offset, int32_t whence); + static void Close(void* file); +}; + +FileCallbacks ShorebirdFileCallbacks() { + return { + .open = FileCallbacksImpl::Open, + .read = FileCallbacksImpl::Read, + .seek = FileCallbacksImpl::Seek, + .close = FileCallbacksImpl::Close, + }; +} + +void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, + flutter::Settings& settings) { + // cache_path is used for both code_cache and app_storage, as we don't persist + // any data between releases. args.app_path is appended to + // the settings.application_library_path vector at this function's call site. + ConfigureShorebird(args.cache_path, args.cache_path, settings, + args.shorebird_yaml_contents, args.app_version, + args.app_build_number); +} + +void ConfigureShorebird(std::string code_cache_path, + std::string app_storage_path, + Settings& settings, + const std::string& shorebird_yaml, + const std::string& version, + const std::string& version_code) { + // If you are crashing here, you probably are running Shorebird in a Debug + // config, where the AOT snapshot won't be linked into the process, and thus + // lookups will fail. Change your Scheme to Release to fix: + // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode + FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) + << "XCode Scheme must be set to Release to use Shorebird"; + + auto shorebird_updater_dir_name = "shorebird_updater"; + + auto code_cache_dir = fml::paths::JoinPaths( + {std::move(code_cache_path), shorebird_updater_dir_name}); + auto app_storage_dir = fml::paths::JoinPaths( + {std::move(app_storage_path), shorebird_updater_dir_name}); + + fml::CreateDirectory(fml::paths::GetCachesDirectory(), + {shorebird_updater_dir_name}, + fml::FilePermission::kReadWrite); + + bool init_result; + // Using a block to make AppParameters lifetime explicit. + { + AppParameters app_parameters; + // Combine version and version_code into a single string. + // We could also pass these separately through to the updater if needed. + auto release_version = version + "+" + version_code; + app_parameters.release_version = release_version.c_str(); + app_parameters.code_cache_dir = code_cache_dir.c_str(); + app_parameters.app_storage_dir = app_storage_dir.c_str(); + + // https://stackoverflow.com/questions/26032039/convert-vectorstring-into-char-c + std::vector c_paths{}; + for (const auto& string : settings.application_library_path) { + c_paths.push_back(string.c_str()); + } + // Do not modify application_library_path or c_strings will invalidate. + + app_parameters.original_libapp_paths = c_paths.data(); + app_parameters.original_libapp_paths_size = c_paths.size(); + + // shorebird_init copies from app_parameters and shorebirdYaml. + init_result = shorebird_init(&app_parameters, ShorebirdFileCallbacks(), + shorebird_yaml.c_str()); + } + + // We've decided not to support synchronous updates on launch for now. + // It's a terrible user experience (having the app hang on launch) and + // instead we will provide examples of how to build a custom update UI + // within Dart, including updating as part of login, etc. + // https://github.com/shorebirdtech/shorebird/issues/950 + + // We only set the base snapshot on iOS for now. +#if FML_OS_IOS || FML_OS_MACOSX + SetBaseSnapshot(settings); +#endif + + char* c_active_path = shorebird_next_boot_patch_path(); + if (c_active_path != NULL) { + std::string active_path = c_active_path; + shorebird_free_string(c_active_path); + FML_LOG(INFO) << "Shorebird updater: active path: " << active_path; + +#if FML_OS_IOS || FML_OS_MACOSX + // On iOS we add the patch to the front of the list instead of clearing + // the list, to allow dart_shapshot.cc to still find the base snapshot + // for the vm isolate. + settings.application_library_path.insert( + settings.application_library_path.begin(), active_path); +#else + settings.application_library_path.clear(); + settings.application_library_path.emplace_back(active_path); +#endif + } else { + FML_LOG(INFO) << "Shorebird updater: no active patch."; + } + + // We are careful only to report a launch start in the case where it's the + // first time we've configured shorebird this process. Otherwise we could end + // up in a case where we report a launch start, but never a completion (e.g. + // from package:flutter_work_manager which sometimes creates a FlutterEngine + // (and thus configures shorebird) but never runs it. The proper fix for this + // is probably to move the launch_start() call to be later in the lifecycle + // (when the snapshot is loaded and run, rather than when FlutterEngine is + // initialized). This "hack" will still have a problem where FlutterEngine is + // initialized but never run before the app is quit, could still cause us to + // suddenly mark-bad a patch that was never actually attempted to launch. + if (!init_result) { + return; + } + + // Once start_update_thread is called, the next_boot_patch* functions may + // change their return values if the shorebird_report_launch_failed + // function is called. + shorebird_report_launch_start(); + + if (shorebird_should_auto_update()) { + FML_LOG(INFO) << "Starting Shorebird update"; + shorebird_start_update_thread(); + } else { + FML_LOG(INFO) + << "Shorebird auto_update disabled, not checking for updates."; + } +} + +void* FileCallbacksImpl::Open() { + return SnapshotsDataHandle::createForSnapshots(*vm_snapshot, + *isolate_snapshot) + .release(); +} + +uintptr_t FileCallbacksImpl::Read(void* file, + uint8_t* buffer, + uintptr_t length) { + return reinterpret_cast(file)->Read(buffer, length); +} + +int64_t FileCallbacksImpl::Seek(void* file, int64_t offset, int32_t whence) { + // Currently we only support blob handles. + return reinterpret_cast(file)->Seek(offset, whence); +} + +void FileCallbacksImpl::Close(void* file) { + delete reinterpret_cast(file); +} + +} // namespace flutter \ No newline at end of file diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h new file mode 100644 index 0000000000000..1c6cb8bcd4443 --- /dev/null +++ b/shell/common/shorebird/shorebird.h @@ -0,0 +1,21 @@ +#ifndef FLUTTER_SHELL_COMMON_SHOREBIRD_SHOREBIRD_H_ +#define FLUTTER_SHELL_COMMON_SHOREBIRD_SHOREBIRD_H_ + +#include "flutter/common/settings.h" +#include "shell/platform/embedder/embedder.h" + +namespace flutter { + +void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, + flutter::Settings& settings); + +void ConfigureShorebird(std::string code_cache_path, + std::string app_storage_path, + flutter::Settings& settings, + const std::string& shorebird_yaml, + const std::string& version, + const std::string& version_code); + +} // namespace flutter + +#endif // FLUTTER_SHELL_COMMON_SHOREBIRD_SHOREBIRD_H_ diff --git a/shell/common/shorebird/snapshots_data_handle.cc b/shell/common/shorebird/snapshots_data_handle.cc new file mode 100644 index 0000000000000..0c6c5a45450a1 --- /dev/null +++ b/shell/common/shorebird/snapshots_data_handle.cc @@ -0,0 +1,144 @@ +#include "flutter/shell/common/shorebird/snapshots_data_handle.h" + +#include "third_party/dart/runtime/include/dart_native_api.h" + +namespace flutter { + +static std::unique_ptr DataMapping(const DartSnapshot& snapshot) { + auto ptr = snapshot.GetDataMapping(); + return std::make_unique(ptr, + Dart_SnapshotDataSize(ptr)); +} + +static std::unique_ptr InstructionsMapping( + const DartSnapshot& snapshot) { + auto ptr = snapshot.GetInstructionsMapping(); + return std::make_unique(ptr, + Dart_SnapshotInstrSize(ptr)); +} + +// The size of the snapshot data is the sum of the sizes of the blobs. +size_t SnapshotsDataHandle::FullSize() const { + size_t size = 0; + for (const auto& blob : blobs_) { + size += blob->GetSize(); + } + return size; +} + +// The offset into the snapshots data blobs as though they were a single +// contiguous buffer. +size_t SnapshotsDataHandle::AbsoluteOffsetForIndex(BlobsIndex index) { + if (index.blob >= blobs_.size()) { + FML_LOG(WARNING) << "Blob index " << index.blob + << " is larger than the number of blobs (" << blobs_.size() + << "). Returning full size (" << FullSize() << ")"; + return FullSize(); + } + if (index.offset > blobs_[index.blob]->GetSize()) { + FML_LOG(WARNING) << "Offset for blob " << index.blob << " (" << index.offset + << ") is larger than the blob size (" + << blobs_[index.blob]->GetSize() + << "). Returning index start of next blob"; + return AbsoluteOffsetForIndex({index.blob + 1, 0}); + } + size_t offset = 0; + for (size_t i = 0; i < index.blob; i++) { + offset += blobs_[i]->GetSize(); + } + offset += index.offset; + return offset; +} + +BlobsIndex SnapshotsDataHandle::IndexForAbsoluteOffset(int64_t offset, + BlobsIndex start_index) { + size_t start_offset = AbsoluteOffsetForIndex(start_index); + if (offset < 0) { + if ((size_t)abs(offset) > start_offset) { + FML_LOG(WARNING) + << "Offset is before the beginning of SnapshotsData. Returning 0, 0"; + return {0, 0}; + } + } else if (offset + start_offset >= FullSize()) { + FML_LOG(WARNING) << "Target offset is past the end of SnapshotsData (" + << offset + start_offset << ", blobs size:" << FullSize() + << "). Returning last blob index and offset"; + return {blobs_.size(), blobs_.back()->GetSize()}; + } + + size_t dest_offset = start_offset + offset; + BlobsIndex index = {0, 0}; + for (const auto& blob : blobs_) { + if (dest_offset < blob->GetSize()) { + // The remaining offset is within this blob. + index.offset = dest_offset; + break; + } + + index.blob++; + dest_offset -= blob->GetSize(); + } + return index; +} + +std::unique_ptr SnapshotsDataHandle::createForSnapshots( + const DartSnapshot& vm_snapshot, + const DartSnapshot& isolate_snapshot) { + // This needs to match the order in which the blobs are written out in + // analyze_snapshot --dump_blobs + std::vector> blobs; + blobs.push_back(DataMapping(vm_snapshot)); + blobs.push_back(DataMapping(isolate_snapshot)); + blobs.push_back(InstructionsMapping(vm_snapshot)); + blobs.push_back(InstructionsMapping(isolate_snapshot)); + return std::make_unique(std::move(blobs)); +} + +uintptr_t SnapshotsDataHandle::Read(uint8_t* buffer, uintptr_t length) { + uintptr_t bytes_read = 0; + // Copy current blob from current offset and possibly into the next blob + // until we have read length bytes. + while (bytes_read < length) { + if (current_index_.blob >= blobs_.size()) { + // We have read all blobs. + break; + } + intptr_t remaining_blob_length = + blobs_[current_index_.blob]->GetSize() - current_index_.offset; + if (remaining_blob_length <= 0) { + // We have read all bytes in this blob. + current_index_.blob++; + current_index_.offset = 0; + continue; + } + intptr_t bytes_to_read = fmin(length - bytes_read, remaining_blob_length); + memcpy(buffer + bytes_read, + blobs_[current_index_.blob]->GetMapping() + current_index_.offset, + bytes_to_read); + bytes_read += bytes_to_read; + current_index_.offset += bytes_to_read; + } + + return bytes_read; +} + +int64_t SnapshotsDataHandle::Seek(int64_t offset, int32_t whence) { + BlobsIndex start_index; + switch (whence) { + case SEEK_CUR: + start_index = current_index_; + break; + case SEEK_SET: + start_index = {0, 0}; + break; + case SEEK_END: + start_index = {blobs_.size(), blobs_.back()->GetSize()}; + break; + default: + FML_CHECK(false) << "Unrecognized whence value in Seek: " << whence; + } + current_index_ = IndexForAbsoluteOffset(offset, start_index); + return current_index_.offset; +} + +} // namespace flutter \ No newline at end of file diff --git a/shell/common/shorebird/snapshots_data_handle.h b/shell/common/shorebird/snapshots_data_handle.h new file mode 100644 index 0000000000000..7a7ec5274d002 --- /dev/null +++ b/shell/common/shorebird/snapshots_data_handle.h @@ -0,0 +1,47 @@ +#ifndef FLUTTER_SHELL_COMMON_SHOREBIRD_SNAPSHOTS_DATA_HANDLE_H_ +#define FLUTTER_SHELL_COMMON_SHOREBIRD_SNAPSHOTS_DATA_HANDLE_H_ + +#include "flutter/fml/file.h" +#include "flutter/runtime/dart_snapshot.h" +#include "third_party/dart/runtime/include/dart_tools_api.h" + +namespace flutter { + +// An offset into an indexed collection of buffers. blob is the index of the +// buffer, and offset is the offset into that buffer. +struct BlobsIndex { + size_t blob; + size_t offset; +}; + +// Implements a POSIX file I/O interface which allows us to provide the four +// data blobs of a Dart snapshot (vm_data, vm_instructions, isolate_data, +// isolate_instructions) to Rust as though it were a single piece of memory. +class SnapshotsDataHandle { + public: + // This would ideally be private, but we need to be able to call it from the + // static createForSnapshots method. + explicit SnapshotsDataHandle(std::vector> blobs) + : blobs_(std::move(blobs)) {} + + static std::unique_ptr createForSnapshots( + const DartSnapshot& vm_snapshot, + const DartSnapshot& isolate_snapshot); + + uintptr_t Read(uint8_t* buffer, uintptr_t length); + int64_t Seek(int64_t offset, int32_t whence); + + // The sum of all the blobs' sizes. + size_t FullSize() const; + + private: + size_t AbsoluteOffsetForIndex(BlobsIndex index); + BlobsIndex IndexForAbsoluteOffset(int64_t offset, BlobsIndex startIndex); + + BlobsIndex current_index_ = {0, 0}; + std::vector> blobs_; +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_COMMON_SHOREBIRD_SNAPSHOTS_DATA_HANDLE_H_ diff --git a/shell/common/shorebird/snapshots_data_handle_unittests.cc b/shell/common/shorebird/snapshots_data_handle_unittests.cc new file mode 100644 index 0000000000000..2acf44a7b8973 --- /dev/null +++ b/shell/common/shorebird/snapshots_data_handle_unittests.cc @@ -0,0 +1,177 @@ +#include +#include +#include + +#include "flutter/shell/common/shorebird/snapshots_data_handle.h" + +#include "flutter/fml/mapping.h" +#include "flutter/runtime/dart_snapshot.h" +#include "flutter/testing/testing.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "testing/fixture_test.h" + +namespace flutter { +namespace testing { + +std::unique_ptr MakeHandle( + std::vector& blobs) { + // Map the strings into non-owned mappings: + std::vector> mappings = {}; + for (auto& blob : blobs) { + std::unique_ptr mapping = + std::make_unique( + reinterpret_cast(blob.data()), blob.size()); + mappings.push_back(std::move(mapping)); + } + auto handle = + std::make_unique(std::move(mappings)); + return handle; +} + +TEST(SnapshotsDataHandle, Read) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 12; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + blobs_handle->Read(buffer, 6); + + EXPECT_EQ(buffer[0], 'a'); + EXPECT_EQ(buffer[1], 'b'); + EXPECT_EQ(buffer[2], 'c'); + EXPECT_EQ(buffer[3], 'd'); + EXPECT_EQ(buffer[4], 'e'); + EXPECT_EQ(buffer[5], 'f'); + + // Only the first 6 bytes should have been read. + EXPECT_EQ(buffer[6], 0); +} + +TEST(SnapshotsDataHandle, ReadAfterSeekWithPositiveOffset) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + blobs_handle->Seek(4, SEEK_CUR); + blobs_handle->Read(buffer, 6); + + EXPECT_EQ(buffer[0], 'e'); + EXPECT_EQ(buffer[1], 'f'); + EXPECT_EQ(buffer[2], 'g'); + EXPECT_EQ(buffer[3], 'h'); + EXPECT_EQ(buffer[4], 'i'); + EXPECT_EQ(buffer[5], 'j'); + + // Only the first 6 bytes should have been read. + EXPECT_EQ(buffer[6], 0); +} + +TEST(SnapshotsDataHandle, ReadAfterSeekWithNegativeOffset) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + blobs_handle->Read(buffer, 5); + EXPECT_EQ(buffer[0], 'a'); + EXPECT_EQ(buffer[1], 'b'); + EXPECT_EQ(buffer[2], 'c'); + EXPECT_EQ(buffer[3], 'd'); + EXPECT_EQ(buffer[4], 'e'); + EXPECT_EQ(buffer[5], 0); + + // Reset buffer + std::fill(buffer, buffer + buffer_size, 0); + + // Read 5, seeked back 4, should start reading at offset 1 ('b') + blobs_handle->Seek(-4, SEEK_CUR); + blobs_handle->Read(buffer, 6); + + EXPECT_EQ(buffer[0], 'b'); + EXPECT_EQ(buffer[1], 'c'); + EXPECT_EQ(buffer[2], 'd'); + EXPECT_EQ(buffer[3], 'e'); + EXPECT_EQ(buffer[4], 'f'); + EXPECT_EQ(buffer[5], 'g'); + EXPECT_EQ(buffer[6], 0); +} + +TEST(SnapshotsDataHandle, SeekPastEnd) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + // Seek 1 past the end + blobs_handle->Seek(blobs_handle->FullSize() + 1, SEEK_CUR); + + // Seek back 2 bytes and read 2 bytes + blobs_handle->Seek(-2, SEEK_CUR); + blobs_handle->Read(buffer, 2); + + EXPECT_EQ(buffer[0], 'k'); + EXPECT_EQ(buffer[1], 'l'); +} + +TEST(SnapshotsDataHandle, SeekBeforeBeginning) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + // Seek before the start of the blobs and read the first 2 bytes. + blobs_handle->Seek(-2, SEEK_CUR); + blobs_handle->Read(buffer, 2); + + EXPECT_EQ(buffer[0], 'a'); + EXPECT_EQ(buffer[1], 'b'); +} + +TEST(SnapshotsDataHandle, SeekFromBeginning) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + // Seek 10 bytes from current (the beginning) + blobs_handle->Seek(10, SEEK_CUR); + + // Seek 2 bytes from the beginning and read 2 bytes + blobs_handle->Seek(2, SEEK_SET); + blobs_handle->Read(buffer, 2); + + EXPECT_EQ(buffer[0], 'c'); + EXPECT_EQ(buffer[1], 'd'); +} + +TEST(SnapshotsDataHandle, SeekFromEnd) { + std::vector blobs = {"abc", "def", "ghi", "jkl"}; + std::unique_ptr blobs_handle = MakeHandle(blobs); + + const size_t buffer_size = 20; + uint8_t buffer[buffer_size]; + std::fill(buffer, buffer + buffer_size, 0); + + // Seek 2 bytes from the end and read 2 bytes + blobs_handle->Seek(-2, SEEK_END); + blobs_handle->Read(buffer, 2); + + EXPECT_EQ(buffer[0], 'k'); + EXPECT_EQ(buffer[1], 'l'); +} + +} // namespace testing +} // namespace flutter diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 6f062431cf747..bde83714ec43b 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -159,6 +159,7 @@ source_set("flutter_shell_native_src") { "//flutter/runtime", "//flutter/runtime:libdart", "//flutter/shell/common", + "//flutter/shell/common/shorebird", "//flutter/shell/platform/android/context", "//flutter/shell/platform/android/external_view_embedder", "//flutter/shell/platform/android/jni", @@ -172,6 +173,8 @@ source_set("flutter_shell_native_src") { public_configs = [ "//flutter:config" ] + include_dirs = [ "//flutter/updater" ] + defines = [] libs = [ @@ -179,6 +182,23 @@ source_set("flutter_shell_native_src") { "EGL", "GLESv2", ] + if (target_cpu == "arm") { + libs += [ "//third_party/updater/target/armv7-linux-androideabi/release/libupdater.a" ] + } else if (target_cpu == "arm64") { + libs += [ + "//third_party/updater/target/aarch64-linux-android/release/libupdater.a", + ] + } else if (target_cpu == "x64") { + libs += [ + "//third_party/updater/target/x86_64-linux-android/release/libupdater.a", + ] + } else if (target_cpu == "x86") { + libs += [ + "//third_party/updater/target/i686-linux-android/release/libupdater.a", + ] + } else { + assert(false, "Unsupported target_cpu") + } } action("gen_android_build_config_java") { @@ -726,6 +746,9 @@ if (target_cpu != "x86") { # TODO(godofredoc): Remove gen_snapshot and rename new_gen_snapshot when v2 migration is complete. # BUG: https://github.com/flutter/flutter/issues/105351 + # This has a somewhat misleading name. We (shorebird) have updated this target + # to include analyze_snapshot as well as gen_snapshot. Because this target is + # used elsewhere in the toolchain, we did not rename it. zip_bundle("new_gen_snapshot") { gen_snapshot_bin = "gen_snapshot" gen_snapshot_out_dir = @@ -733,6 +756,14 @@ if (target_cpu != "x86") { "root_out_dir") gen_snapshot_path = rebase_path("$gen_snapshot_out_dir/$gen_snapshot_bin") + analyze_snapshot_bin = "analyze_snapshot" + analyze_snapshot_out_dir = + get_label_info( + "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)", + "root_out_dir") + analyze_snapshot_path = + rebase_path("$analyze_snapshot_out_dir/$analyze_snapshot_bin") + if (host_os == "linux") { output = "$android_zip_archive_dir/$full_platform_name-$flutter_runtime_mode/linux-x64.zip" } else if (host_os == "mac") { @@ -741,6 +772,8 @@ if (target_cpu != "x86") { output = "$android_zip_archive_dir/$full_platform_name-$flutter_runtime_mode/windows-x64.zip" gen_snapshot_bin = "gen_snapshot.exe" gen_snapshot_path = rebase_path("$root_out_dir/$gen_snapshot_bin") + analyze_snapshot_bin = "analyze_snapshot.exe" + analyze_snapshot_path = rebase_path("$root_out_dir/$analyze_snapshot_bin") } files = [ @@ -748,9 +781,16 @@ if (target_cpu != "x86") { source = gen_snapshot_path destination = gen_snapshot_bin }, + { + source = analyze_snapshot_path + destination = analyze_snapshot_bin + }, ] - deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ] + deps = [ + "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)", + "$dart_src/runtime/bin:gen_snapshot($host_toolchain)", + ] if (host_os == "mac") { deps += [ ":android_entitlement_config" ] @@ -764,7 +804,7 @@ if (target_cpu != "x86") { } } -if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) { +if (target_cpu == "arm64") { zip_bundle("analyze_snapshot") { deps = [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ] diff --git a/shell/platform/android/android_exports.lst b/shell/platform/android/android_exports.lst index 198bff773dd74..90333c576066c 100644 --- a/shell/platform/android/android_exports.lst +++ b/shell/platform/android/android_exports.lst @@ -11,6 +11,16 @@ _binary_icudtl_dat_size; InternalFlutterGpu*; kInternalFlutterGpu*; + shorebird_init; + shorebird_active_path; + shorebird_active_patch_number; + shorebird_free_string; + shorebird_free_update_result; + shorebird_check_for_downloadable_update; + shorebird_update; + shorebird_update_with_result; + shorebird_next_boot_patch_number; + shorebird_current_boot_patch_number; local: *; }; diff --git a/shell/platform/android/flutter_main.cc b/shell/platform/android/flutter_main.cc index 184a2e98d4bd9..61e949b737356 100644 --- a/shell/platform/android/flutter_main.cc +++ b/shell/platform/android/flutter_main.cc @@ -21,6 +21,7 @@ #include "flutter/lib/ui/plugins/callback_cache.h" #include "flutter/runtime/dart_vm.h" #include "flutter/shell/common/shell.h" +#include "flutter/shell/common/shorebird/shorebird.h" #include "flutter/shell/common/switches.h" #include "flutter/shell/platform/android/android_context_vk_impeller.h" #include "flutter/shell/platform/android/context/android_context.h" @@ -30,6 +31,8 @@ #include "third_party/dart/runtime/include/dart_tools_api.h" #include "txt/platform.h" +#include "third_party/updater/library/include/updater.h" + namespace flutter { constexpr int kMinimumAndroidApiLevelForVulkan = 29; @@ -72,6 +75,9 @@ void FlutterMain::Init(JNIEnv* env, jstring kernelPath, jstring appStoragePath, jstring engineCachesPath, + jstring shorebirdYaml, + jstring version, + jstring versionCode, jlong initTimeMillis) { std::vector args; args.push_back("flutter"); @@ -120,8 +126,18 @@ void FlutterMain::Init(JNIEnv* env, flutter::DartCallbackCache::SetCachePath( fml::jni::JavaStringToString(env, appStoragePath)); - fml::paths::InitializeAndroidCachesPath( - fml::jni::JavaStringToString(env, engineCachesPath)); + auto code_cache_path = fml::jni::JavaStringToString(env, engineCachesPath); + auto app_storage_path = fml::jni::JavaStringToString(env, appStoragePath); + fml::paths::InitializeAndroidCachesPath(code_cache_path); + +#if FLUTTER_RELEASE + std::string shorebird_yaml = fml::jni::JavaStringToString(env, shorebirdYaml); + std::string version_string = fml::jni::JavaStringToString(env, version); + std::string version_code_string = + fml::jni::JavaStringToString(env, versionCode); + ConfigureShorebird(code_cache_path, app_storage_path, settings, + shorebird_yaml, version_string, version_code_string); +#endif flutter::DartCallbackCache::LoadCacheFromDisk(); @@ -211,6 +227,7 @@ bool FlutterMain::Register(JNIEnv* env) { { .name = "nativeInit", .signature = "(Landroid/content/Context;[Ljava/lang/String;Ljava/" + "lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/" "lang/String;Ljava/lang/String;Ljava/lang/String;J)V", .fnPtr = reinterpret_cast(&Init), }, diff --git a/shell/platform/android/flutter_main.h b/shell/platform/android/flutter_main.h index c572b458fbc29..1d9f0ab9d6fb3 100644 --- a/shell/platform/android/flutter_main.h +++ b/shell/platform/android/flutter_main.h @@ -39,6 +39,9 @@ class FlutterMain { jstring kernelPath, jstring appStoragePath, jstring engineCachesPath, + jstring shorebirdYaml, + jstring version, + jstring versionCode, jlong initTimeMillis); void SetupDartVMServiceUriCallback(JNIEnv* env); diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java index 389e866829f09..cf54bf600e676 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java @@ -7,6 +7,8 @@ import static io.flutter.Build.API_LEVELS; import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.ColorSpace; @@ -40,7 +42,10 @@ import io.flutter.view.AccessibilityBridge; import io.flutter.view.FlutterCallbackInformation; import io.flutter.view.TextureRegistry; +import java.io.BufferedReader; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.lang.ref.WeakReference; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -177,6 +182,9 @@ private static native void nativeInit( @Nullable String bundlePath, @NonNull String appStoragePath, @NonNull String engineCachesPath, + @Nullable String shorebirdYaml, + @Nullable String version, + @Nullable String versionCode, long initTimeMillis); /** @@ -202,8 +210,46 @@ public void init( Log.w(TAG, "FlutterJNI.init called more than once"); } + String version = null; + String versionCode = null; + try { + PackageInfo packageInfo = + context.getPackageManager().getPackageInfo(context.getPackageName(), 0); + version = packageInfo.versionName; + if (Build.VERSION.SDK_INT >= API_LEVELS.API_28) { + versionCode = String.valueOf(packageInfo.getLongVersionCode()); + } else { + versionCode = String.valueOf(packageInfo.versionCode); + } + } catch (PackageManager.NameNotFoundException e) { + Log.e(TAG, "Failed to read app version. Shorebird updater can't run.", e); + } + + String shorebirdYaml = null; + try { + InputStream yaml = context.getAssets().open("flutter_assets/shorebird.yaml"); + BufferedReader r = new BufferedReader(new InputStreamReader(yaml)); + StringBuilder total = new StringBuilder(); + for (String line; (line = r.readLine()) != null; ) { + total.append(line).append('\n'); + } + shorebirdYaml = total.toString(); + Log.d(TAG, "shorebird.yaml: " + shorebirdYaml); + } catch (IOException e) { + Log.e(TAG, "Failed to load shorebird.yaml", e); + Log.e(TAG, "Did you remember to include shorebird.yaml in your pubspec.yaml's assets?"); + } + FlutterJNI.nativeInit( - context, args, bundlePath, appStoragePath, engineCachesPath, initTimeMillis); + context, + args, + bundlePath, + appStoragePath, + engineCachesPath, + shorebirdYaml, + version, + versionCode, + initTimeMillis); FlutterJNI.initCalled = true; } diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index ab58295121949..30d8eafdaafb5 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -52,6 +52,7 @@ source_set("flutter_framework_source_arc") { deps = [ ":flutter_framework_source", "//flutter/fml", + "//flutter/shell/common/shorebird", "//flutter/shell/platform/common:common_cpp_input", "//flutter/shell/platform/darwin/common:framework_common", "//flutter/third_party/icu", @@ -202,9 +203,11 @@ source_set("flutter_framework_source") { } deps += [ + "$dart_src/runtime/bin:elf_loader", "//flutter/fml", "//flutter/runtime", "//flutter/shell/common", + "//flutter/shell/common/shorebird", "//flutter/shell/platform/darwin/common", "//flutter/shell/platform/darwin/common:framework_common", "//flutter/shell/platform/embedder:embedder_as_internal_library", @@ -217,6 +220,17 @@ source_set("flutter_framework_source") { "//flutter:config", ] + if (target_cpu == "arm64") { + libs = [ + "//third_party/updater/target/aarch64-apple-ios/release/libupdater.a", + ] + } else if (target_cpu == "x64") { + libs = + [ "//third_party/updater/target/x86_64-apple-ios/release/libupdater.a" ] + } else { + assert(false, "Unsupported target_cpu") + } + frameworks = [ "AudioToolbox.framework", "CoreMedia.framework", diff --git a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm index 9c64bfef3a364..2a8f3365777de 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm @@ -12,6 +12,8 @@ #include #include "flutter/common/constants.h" +#include "flutter/fml/paths.h" +#include "flutter/shell/common/shorebird/shorebird.h" #include "flutter/shell/common/switches.h" #import "flutter/shell/platform/darwin/common/command_line.h" @@ -96,10 +98,12 @@ static BOOL DoesHardwareSupportWideGamut() { } if (flutter::DartVM::IsRunningPrecompiledCode()) { + NSLog(@"SANITY CHECK: Running precompiled code."); if (hasExplicitBundle) { NSString* executablePath = bundle.executablePath; if ([[NSFileManager defaultManager] fileExistsAtPath:executablePath]) { settings.application_library_path.push_back(executablePath.UTF8String); + NSLog(@"Using precompiled library from %@", executablePath); } } @@ -111,6 +115,7 @@ static BOOL DoesHardwareSupportWideGamut() { NSString* executablePath = [NSBundle bundleWithPath:libraryPath].executablePath; if (executablePath.length > 0) { settings.application_library_path.push_back(executablePath.UTF8String); + NSLog(@"Using library from %@", libraryPath); } } } @@ -125,6 +130,7 @@ static BOOL DoesHardwareSupportWideGamut() { [NSBundle bundleWithPath:applicationFrameworkPath].executablePath; if (executablePath.length > 0) { settings.application_library_path.push_back(executablePath.UTF8String); + NSLog(@"Using App.framework from %@", applicationFrameworkPath); } } } @@ -156,6 +162,33 @@ static BOOL DoesHardwareSupportWideGamut() { } } + NSString* assetsPath = [NSString stringWithUTF8String:settings.assets_path.c_str()]; + NSLog(@"ASSET PATH %@", assetsPath); + + // FIXME: This may not be the correct path (e.g., should it include the organization id?) + // See + // https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW13 + // /private/var/mobile/Containers/Data/Application/264477BF-6E38-47C9-AAD9-532BB842F197/Library/Application + // Support/shorebird/shorebird_updater + std::string cache_path = + fml::paths::JoinPaths({getenv("HOME"), "Library/Application Support/shorebird"}); + NSURL* shorebirdYamlPath = [NSURL URLWithString:@"shorebird.yaml" + relativeToURL:[NSURL fileURLWithPath:assetsPath]]; + NSString* appVersion = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + NSString* appBuildNumber = [mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + NSString* shorebirdYamlContents = [NSString stringWithContentsOfURL:shorebirdYamlPath + encoding:NSUTF8StringEncoding + error:nil]; + if (shorebirdYamlContents != nil) { + // Note: we intentionally pass cache_path twice. We provide two different directories + // to ConfigureShorebird because Android differentiates between data that persists + // between releases and data that does not. iOS does not make this distinction. + flutter::ConfigureShorebird(cache_path, cache_path, settings, shorebirdYamlContents.UTF8String, + appVersion.UTF8String, appBuildNumber.UTF8String); + } else { + NSLog(@"Failed to find shorebird.yaml, not starting updater."); + } + // Domain network configuration // Disabled in https://github.com/flutter/flutter/issues/72723. // Re-enable in https://github.com/flutter/flutter/issues/54448. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index ebf48bdd1076a..101de7adbc865 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -34,6 +34,8 @@ #import "flutter/shell/platform/embedder/embedder.h" #import "flutter/third_party/spring_animation/spring_animation.h" +#import + static constexpr int kMicrosecondsPerSecond = 1000 * 1000; static constexpr CGFloat kScrollViewContentSize = 2.0; @@ -238,6 +240,8 @@ - (void)sharedSetupWithProject:(nullable FlutterDartProject*)project if (!project) { project = [[[FlutterDartProject alloc] init] autorelease]; } + FML_LOG(INFO) << "CPU::Id(): " << dart::CPU::Id(); + FlutterView.forceSoftwareRendering = project.settings.enable_software_rendering; _weakFactory = std::make_unique>(self); auto engine = fml::scoped_nsobject{[[FlutterEngine alloc] diff --git a/shell/platform/darwin/macos/BUILD.gn b/shell/platform/darwin/macos/BUILD.gn index 3ce4bfc1f0a77..2975a38fb8d08 100644 --- a/shell/platform/darwin/macos/BUILD.gn +++ b/shell/platform/darwin/macos/BUILD.gn @@ -127,6 +127,7 @@ source_set("flutter_framework_source") { "//flutter/shell/platform/common:common_cpp_enums", "//flutter/shell/platform/common:common_cpp_input", "//flutter/shell/platform/common:common_cpp_switches", + "//flutter/shell/platform/darwin/common", "//flutter/shell/platform/darwin/common:availability_version_check", "//flutter/shell/platform/darwin/common:framework_common", "//flutter/shell/platform/darwin/graphics:graphics", diff --git a/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm b/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm index 2c79ee079d4b9..c870f0d3f55ea 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm @@ -10,6 +10,7 @@ #include #include "flutter/common/constants.h" +#include "flutter/fml/paths.h" #include "flutter/shell/platform/common/app_lifecycle_state.h" #include "flutter/shell/platform/common/engine_switches.h" #include "flutter/shell/platform/embedder/embedder.h" @@ -679,6 +680,28 @@ - (BOOL)runWithEntrypoint:(NSString*)entrypoint { [engine onVSync:baton]; }; + NSString* bundlePath = + [[NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL + URLByAppendingPathComponent:@"App.framework"]] bundlePath]; + bundlePath = [bundlePath stringByAppendingString:@"/App"]; + flutterArguments.shorebird_args.app_path = bundlePath.UTF8String; + NSString* assetsPath = _project.assetsPath; + NSURL* shorebirdYamlPath = [NSURL URLWithString:@"shorebird.yaml" + relativeToURL:[NSURL fileURLWithPath:assetsPath]]; + NSString* shorebirdYamlContents = [NSString stringWithContentsOfURL:shorebirdYamlPath + encoding:NSUTF8StringEncoding + error:nil]; + NSString* appVersion = + [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + NSString* appBuildNumber = [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + flutterArguments.shorebird_args.app_version = appVersion.UTF8String; + flutterArguments.shorebird_args.app_build_number = appBuildNumber.UTF8String; + + std::string cache_path = + fml::paths::JoinPaths({getenv("HOME"), "Library", "Application Support", "shorebird"}); + flutterArguments.shorebird_args.cache_path = cache_path.c_str(); + flutterArguments.shorebird_args.shorebird_yaml_contents = shorebirdYamlContents.UTF8String; + FlutterRendererConfig rendererConfig = [_renderer createRendererConfig]; FlutterEngineResult result = _embedderAPI.Initialize( FLUTTER_ENGINE_VERSION, &rendererConfig, &flutterArguments, (__bridge void*)(self), &_engine); diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index 38c7e2db98e87..c620e74761979 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -110,6 +110,7 @@ template("embedder_source_set") { "//flutter/lib/ui", "//flutter/runtime:libdart", "//flutter/shell/common", + "//flutter/shell/common/shorebird", "//flutter/skia", "//flutter/third_party/tonic", ] diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 2adf56c592e0a..6f6ffc2b24df9 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -50,6 +50,7 @@ extern const intptr_t kPlatformStrongDillSize; #include "flutter/fml/paths.h" #include "flutter/fml/trace_event.h" #include "flutter/shell/common/rasterizer.h" +#include "flutter/shell/common/shorebird/shorebird.h" #include "flutter/shell/common/switches.h" #include "flutter/shell/platform/embedder/embedder.h" #include "flutter/shell/platform/embedder/embedder_engine.h" @@ -2305,6 +2306,15 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, "Could not infer the Flutter project to run from given arguments."); } + // Begin shorebird + if (args->shorebird_args.shorebird_yaml_contents) { + settings.application_library_path.push_back(args->shorebird_args.app_path); + flutter::ConfigureShorebird(args->shorebird_args, settings); + } else { + FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; + } + // End shorebird + // Create the engine but don't launch the shell or run the root isolate. auto embedder_engine = std::make_unique( std::move(thread_host), // diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 9e9b875a2cc36..482a4cad90f6c 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -2204,6 +2204,42 @@ typedef void (*FlutterLogMessageCallback)(const char* /* tag */, /// FlutterEngine instance in AOT mode. typedef struct _FlutterEngineAOTData* FlutterEngineAOTData; +typedef struct { + /// The version of the app (e.g., 1.0.0). + /// + /// The string can be collected after the call to `FlutterEngineInitialize` + /// returns. The string must be NULL terminated. + const char* app_version; + + /// The build number of the app (e.g., 1). + /// + /// The string can be collected after the call to `FlutterEngineInitialize` + /// returns. The string must be NULL terminated. + const char* app_build_number; + + /// The text contents of the shorebird.yaml file bundled with the compiled + /// app. Note that this is _not_ the same as the shorebird.yaml that exists in + /// the user's project. + /// + /// The string can be collected after the call to `FlutterEngineInitialize` + /// returns. The string must be NULL terminated. + const char* shorebird_yaml_contents; + + /// The path to the directory where Shorebird will store patches and state + /// data. + /// + /// The string can be collected after the call to `FlutterEngineInitialize` + /// returns. The string must be NULL terminated. + const char* cache_path; + + /// The path to the executable file. This is a Mach-O executable file on + /// macOS. + /// + /// The string can be collected after the call to `FlutterEngineInitialize` + /// returns. The string must be NULL terminated. + const char* app_path; +} ShorebirdFlutterProjectArgs; + typedef struct { /// The size of this struct. Must be sizeof(FlutterProjectArgs). size_t struct_size; @@ -2503,6 +2539,9 @@ typedef struct { /// being registered on the framework side. The callback is invoked from /// a task posted to the platform thread. FlutterChannelUpdateCallback channel_update_callback; + + /// Data used to initialize Shorebird as part of engine initialization. + ShorebirdFlutterProjectArgs shorebird_args; } FlutterProjectArgs; #ifndef FLUTTER_ENGINE_NO_PROTOTYPES diff --git a/shell/platform/windows/platform_handler.cc b/shell/platform/windows/platform_handler.cc index 197de59345351..48ebf0cf0411b 100644 --- a/shell/platform/windows/platform_handler.cc +++ b/shell/platform/windows/platform_handler.cc @@ -60,7 +60,7 @@ class ScopedGlobalMemory { memory_ = ::GlobalAlloc(flags, bytes); if (!memory_) { FML_LOG(ERROR) << "Unable to allocate global memory: " - << ::GetLastError(); + << static_cast(::GetLastError()); } } @@ -68,7 +68,7 @@ class ScopedGlobalMemory { if (memory_) { if (::GlobalFree(memory_) != nullptr) { FML_LOG(ERROR) << "Failed to free global allocation: " - << ::GetLastError(); + << static_cast(::GetLastError()); } } } @@ -175,12 +175,12 @@ std::variant ScopedClipboard::GetString() { HANDLE data = ::GetClipboardData(CF_UNICODETEXT); if (data == nullptr) { - return ::GetLastError(); + return static_cast(::GetLastError()); } ScopedGlobalLock locked_data(data); if (!locked_data.get()) { - return ::GetLastError(); + return static_cast(::GetLastError()); } return static_cast(locked_data.get()); } diff --git a/shell/testing/BUILD.gn b/shell/testing/BUILD.gn index 28a19c75d1bb9..ce47535e8db12 100644 --- a/shell/testing/BUILD.gn +++ b/shell/testing/BUILD.gn @@ -38,6 +38,7 @@ executable("testing") { deps = [ "$dart_src/runtime:libdart_jit", "$dart_src/runtime/bin:dart_io_api", + "$dart_src/runtime/bin:elf_loader", "//flutter/assets", "//flutter/common", "//flutter/flow", diff --git a/sky/tools/create_full_ios_framework.py b/sky/tools/create_full_ios_framework.py new file mode 100644 index 0000000000000..2738b8693302f --- /dev/null +++ b/sky/tools/create_full_ios_framework.py @@ -0,0 +1,300 @@ +#!/usr/bin/env python3 +# +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Generates and zip the ios flutter framework including the architecture +# dependent snapshot. + +import argparse +import os +import platform +import shutil +import subprocess +import sys + +from create_xcframework import create_xcframework # pylint: disable=import-error + +ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64' +DSYMUTIL = os.path.join( + os.path.dirname(__file__), '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin', 'dsymutil' +) + +buildroot_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '..', '..', '..')) + + +def main(): + parser = argparse.ArgumentParser( + description=( + 'Creates Flutter.framework, Flutter.xcframework and ' + 'copies architecture-dependent gen_snapshot binaries to output dir' + ) + ) + + parser.add_argument('--dst', type=str, required=True) + parser.add_argument('--clang-dir', type=str, default='clang_x64') + parser.add_argument('--x64-out-dir', type=str) + parser.add_argument('--arm64-out-dir', type=str, required=True) + parser.add_argument('--simulator-x64-out-dir', type=str, required=True) + parser.add_argument('--simulator-arm64-out-dir', type=str, required=False) + parser.add_argument('--strip', action='store_true', default=False) + parser.add_argument('--dsym', action='store_true', default=False) + + args = parser.parse_args() + + dst = (args.dst if os.path.isabs(args.dst) else os.path.join(buildroot_dir, args.dst)) + + arm64_out_dir = ( + args.arm64_out_dir + if os.path.isabs(args.arm64_out_dir) else os.path.join(buildroot_dir, args.arm64_out_dir) + ) + + x64_out_dir = None + if args.x64_out_dir: + x64_out_dir = ( + args.x64_out_dir + if os.path.isabs(args.x64_out_dir) else os.path.join(buildroot_dir, args.x64_out_dir) + ) + + simulator_x64_out_dir = None + if args.simulator_x64_out_dir: + simulator_x64_out_dir = ( + args.simulator_x64_out_dir if os.path.isabs(args.simulator_x64_out_dir) else + os.path.join(buildroot_dir, args.simulator_x64_out_dir) + ) + + framework = os.path.join(dst, 'Flutter.framework') + simulator_framework = os.path.join(dst, 'sim', 'Flutter.framework') + arm64_framework = os.path.join(arm64_out_dir, 'Flutter.framework') + simulator_x64_framework = os.path.join(simulator_x64_out_dir, 'Flutter.framework') + + simulator_arm64_out_dir = None + if args.simulator_arm64_out_dir: + simulator_arm64_out_dir = ( + args.simulator_arm64_out_dir if os.path.isabs(args.simulator_arm64_out_dir) else + os.path.join(buildroot_dir, args.simulator_arm64_out_dir) + ) + + if args.simulator_arm64_out_dir is not None: + simulator_arm64_framework = os.path.join(simulator_arm64_out_dir, 'Flutter.framework') + + if not os.path.isdir(arm64_framework): + print('Cannot find iOS arm64 Framework at %s' % arm64_framework) + return 1 + + if not os.path.isdir(simulator_x64_framework): + print('Cannot find iOS x64 simulator Framework at %s' % simulator_framework) + return 1 + + if not os.path.isfile(DSYMUTIL): + print('Cannot find dsymutil at %s' % DSYMUTIL) + return 1 + + create_framework( + args, dst, framework, arm64_framework, simulator_framework, simulator_x64_framework, + simulator_arm64_framework + ) + + extension_safe_dst = os.path.join(dst, 'extension_safe') + create_extension_safe_framework( + args, extension_safe_dst, '%s_extension_safe' % arm64_out_dir, + '%s_extension_safe' % simulator_x64_out_dir, '%s_extension_safe' % simulator_arm64_out_dir + ) + + generate_gen_snapshot(args, dst, x64_out_dir, arm64_out_dir) + generate_analyze_snapshot(args, dst, x64_out_dir, arm64_out_dir) + zip_archive(dst) + return 0 + +def create_extension_safe_framework( # pylint: disable=too-many-arguments + args, dst, arm64_out_dir, simulator_x64_out_dir, simulator_arm64_out_dir +): + framework = os.path.join(dst, 'Flutter.framework') + simulator_framework = os.path.join(dst, 'sim', 'Flutter.framework') + arm64_framework = os.path.join(arm64_out_dir, 'Flutter.framework') + simulator_x64_framework = os.path.join(simulator_x64_out_dir, 'Flutter.framework') + simulator_arm64_framework = os.path.join(simulator_arm64_out_dir, 'Flutter.framework') + + if not os.path.isdir(arm64_framework): + print('Cannot find extension safe iOS arm64 Framework at %s' % arm64_framework) + return 1 + + if not os.path.isdir(simulator_x64_framework): + print('Cannot find extension safe iOS x64 simulator Framework at %s' % simulator_x64_framework) + return 1 + + create_framework( + args, dst, framework, arm64_framework, simulator_framework, simulator_x64_framework, + simulator_arm64_framework + ) + return 0 + +def create_framework( # pylint: disable=too-many-arguments + args, dst, framework, arm64_framework, simulator_framework, + simulator_x64_framework, simulator_arm64_framework +): + arm64_dylib = os.path.join(arm64_framework, 'Flutter') + simulator_x64_dylib = os.path.join(simulator_x64_framework, 'Flutter') + simulator_arm64_dylib = os.path.join(simulator_arm64_framework, 'Flutter') + if not os.path.isfile(arm64_dylib): + print('Cannot find iOS arm64 dylib at %s' % arm64_dylib) + return 1 + + if not os.path.isfile(simulator_x64_dylib): + print('Cannot find iOS simulator dylib at %s' % simulator_x64_dylib) + return 1 + + # Compute dsym output paths, if enabled. + framework_dsym = None + simulator_dsym = None + if args.dsym: + framework_dsym = framework + '.dSYM' + simulator_dsym = simulator_framework + '.dSYM' + + # Emit the framework for physical devices. + shutil.rmtree(framework, True) + shutil.copytree(arm64_framework, framework) + framework_binary = os.path.join(framework, 'Flutter') + process_framework(args, dst, framework_binary, framework_dsym) + + # Emit the framework for simulators. + if args.simulator_arm64_out_dir is not None: + shutil.rmtree(simulator_framework, True) + shutil.copytree(simulator_arm64_framework, simulator_framework) + + simulator_framework_binary = os.path.join(simulator_framework, 'Flutter') + + # Create the arm64/x64 simulator fat framework. + subprocess.check_call([ + 'lipo', simulator_x64_dylib, simulator_arm64_dylib, '-create', '-output', + simulator_framework_binary + ]) + process_framework(args, dst, simulator_framework_binary, simulator_dsym) + else: + simulator_framework = simulator_x64_framework + + # Create XCFramework from the arm-only fat framework and the arm64/x64 + # simulator frameworks, or just the x64 simulator framework if only that one + # exists. + xcframeworks = [simulator_framework, framework] + dsyms = [simulator_dsym, framework_dsym] if args.dsym else None + create_xcframework(location=dst, name='Flutter', frameworks=xcframeworks, dsyms=dsyms) + + # Add the x64 simulator into the fat framework. + subprocess.check_call([ + 'lipo', arm64_dylib, simulator_x64_dylib, '-create', '-output', framework_binary + ]) + + process_framework(args, dst, framework_binary, framework_dsym) + return 0 + + +def embed_codesign_configuration(config_path, contents): + with open(config_path, 'w') as file: + file.write('\n'.join(contents) + '\n') + + +def zip_archive(dst): + ios_file_with_entitlements = ['gen_snapshot_arm64'] + ios_file_without_entitlements = [ + 'Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', + 'Flutter.xcframework/ios-arm64/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter', + 'Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter', + 'Flutter.xcframework/ios-arm64_x86_64-simulator/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter', # pylint: disable=line-too-long + 'extension_safe/Flutter.xcframework/ios-arm64/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter', # pylint: disable=line-too-long + 'extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter', + 'extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter' # pylint: disable=line-too-long + ] + embed_codesign_configuration(os.path.join(dst, 'entitlements.txt'), ios_file_with_entitlements) + + embed_codesign_configuration( + os.path.join(dst, 'without_entitlements.txt'), ios_file_without_entitlements + ) + + subprocess.check_call([ + 'zip', + '-r', + 'artifacts.zip', + 'analyze_snapshot_arm64', + 'gen_snapshot_arm64', + 'Flutter.xcframework', + 'entitlements.txt', + 'without_entitlements.txt', + 'extension_safe/Flutter.xcframework', + ], + cwd=dst) + + # Generate Flutter.dSYM.zip for manual symbolification. + # + # Historically, the framework dSYM was named Flutter.dSYM, so in order to + # remain backward-compatible with existing instructions in docs/Crashes.md + # and existing tooling such as dart-lang/dart_ci, we rename back to that name + # + # TODO(cbracken): remove these archives and the upload steps once we bundle + # dSYMs in app archives. https://github.com/flutter/flutter/issues/116493 + framework_dsym = os.path.join(dst, 'Flutter.framework.dSYM') + if os.path.exists(framework_dsym): + renamed_dsym = framework_dsym.replace('Flutter.framework.dSYM', 'Flutter.dSYM') + os.rename(framework_dsym, renamed_dsym) + subprocess.check_call(['zip', '-r', 'Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst) + + extension_safe_dsym = os.path.join(dst, 'extension_safe', 'Flutter.framework.dSYM') + if os.path.exists(extension_safe_dsym): + renamed_dsym = extension_safe_dsym.replace('Flutter.framework.dSYM', 'Flutter.dSYM') + os.rename(extension_safe_dsym, renamed_dsym) + subprocess.check_call(['zip', '-r', 'extension_safe_Flutter.dSYM.zip', 'Flutter.dSYM'], cwd=dst) + + +def process_framework(args, dst, framework_binary, dsym): + if dsym: + subprocess.check_call([DSYMUTIL, '-o', dsym, framework_binary]) + + if args.strip: + # copy unstripped + unstripped_out = os.path.join(dst, 'Flutter.unstripped') + shutil.copyfile(framework_binary, unstripped_out) + subprocess.check_call(['strip', '-x', '-S', framework_binary]) + + +def generate_gen_snapshot(args, dst, x64_out_dir, arm64_out_dir): + if x64_out_dir: + _generate_gen_snapshot(x64_out_dir, os.path.join(dst, 'gen_snapshot_x64')) + + if arm64_out_dir: + _generate_gen_snapshot( + os.path.join(arm64_out_dir, args.clang_dir), os.path.join(dst, 'gen_snapshot_arm64') + ) + + +def _generate_gen_snapshot(directory, destination): + gen_snapshot_dir = os.path.join(directory, 'gen_snapshot') + if not os.path.isfile(gen_snapshot_dir): + print('Cannot find gen_snapshot at %s' % gen_snapshot_dir) + sys.exit(1) + + subprocess.check_call(['xcrun', 'bitcode_strip', '-r', gen_snapshot_dir, '-o', destination]) + + +def generate_analyze_snapshot(args, dst, x64_out_dir, arm64_out_dir): + if x64_out_dir: + _generate_analyze_snapshot(x64_out_dir, os.path.join(dst, 'analyze_snapshot_x64')) + + if arm64_out_dir: + _generate_analyze_snapshot( + os.path.join(arm64_out_dir, args.clang_dir), os.path.join(dst, 'analyze_snapshot_arm64') + ) + + +def _generate_analyze_snapshot(directory, destination): + analyze_snapshot_dir = os.path.join(directory, 'analyze_snapshot') + if not os.path.isfile(analyze_snapshot_dir): + print('Cannot find analyze_snapshot at %s' % analyze_snapshot_dir) + sys.exit(1) + + subprocess.check_call(['xcrun', 'bitcode_strip', '-r', analyze_snapshot_dir, '-o', destination]) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/testing/run_tests.py b/testing/run_tests.py index d66e4e98dc87a..2725a22fb3b64 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -444,6 +444,7 @@ def make_test(name, flags=None, extra_env=None): make_test('platform_view_android_delegate_unittests'), # https://github.com/flutter/flutter/issues/36295 make_test('shell_unittests'), + make_test('shorebird_unittests'), ] if is_windows(): From dce8560dcbcd1ddb45d4ea54b0ad05816a2a9946 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Thu, 12 Dec 2024 13:12:33 -0600 Subject: [PATCH 02/50] fix: remove flutter/fml/size include --- shell/common/shorebird/shorebird.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index a77b85414e306..89d49d68fafa1 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -14,7 +14,6 @@ #include "flutter/fml/message_loop.h" #include "flutter/fml/native_library.h" #include "flutter/fml/paths.h" -#include "flutter/fml/size.h" #include "flutter/lib/ui/plugins/callback_cache.h" #include "flutter/runtime/dart_snapshot.h" #include "flutter/runtime/dart_vm.h" From c646971d4a8a5667d55501500bcc422d5f2d2e7d Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Thu, 12 Dec 2024 16:21:15 -0600 Subject: [PATCH 03/50] fix: use shorebird buildroot --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 3d8f8fb1d2fcb..878bc4bfcf8ae 100644 --- a/DEPS +++ b/DEPS @@ -279,7 +279,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'f85c3be4bf808add6ba867b8ff7943fd235b7b5e', + 'src': 'https://github.com/shorebirdtech/buildroot.git' + '@' + '4c5c8abd2ab1ac7c2c029503c71450a87bf94307', 'src/flutter/third_party/depot_tools': Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', From 2c8e28741f9c0d4e6bd9432d54a64ce8ba0f3ca6 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 13 Dec 2024 11:58:59 -0500 Subject: [PATCH 04/50] fix: generate analyze snapshot for arm builds --- lib/snapshot/BUILD.gn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 2e84d775c9578..6cfd629183bb8 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -37,10 +37,11 @@ group("generate_snapshot_bins") { deps += [ ":create_macos_gen_snapshots" ] } else if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { - deps += [ - ":create_arm_analyze_snapshot", - ":create_arm_gen_snapshot", - ] + deps += [ ":create_arm_gen_snapshot" ] + } + + if (host_os == "mac" && target_os != "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { + deps += [ ":create_arm_analyze_snapshot" ] } # Build analyze_snapshot for 64-bit target CPUs. From be0ad7316ff2a68000930dadf346a07d1d82a0dc Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 13 Dec 2024 11:59:21 -0500 Subject: [PATCH 05/50] formatting --- lib/snapshot/BUILD.gn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 6cfd629183bb8..0f062ea17d7be 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -40,7 +40,8 @@ group("generate_snapshot_bins") { deps += [ ":create_arm_gen_snapshot" ] } - if (host_os == "mac" && target_os != "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { + if (host_os == "mac" && target_os != "mac" && + (target_cpu == "arm" || target_cpu == "arm64")) { deps += [ ":create_arm_analyze_snapshot" ] } From 59571a1190752bc1740bff652ce5f0ba7c9413f8 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 13 Dec 2024 14:16:48 -0500 Subject: [PATCH 06/50] fix: update how we generate analyze_snapshot (#92) * fix: update how we generate analyze_snapshot * formatting --- lib/snapshot/BUILD.gn | 92 +++++++++++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 25 deletions(-) diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 0f062ea17d7be..2509e27cfdbd3 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -34,17 +34,15 @@ group("generate_snapshot_bins") { # For macOS target builds: needed for both target CPUs (arm64, x64). # For iOS, Android target builds: all AOT target CPUs are arm/arm64. if (host_os == "mac" && (target_os == "mac" || target_os == "ios")) { - deps += [ ":create_macos_gen_snapshots" ] + deps += [ + ":create_macos_analyze_snapshots", + ":create_macos_gen_snapshots", + ] } else if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { deps += [ ":create_arm_gen_snapshot" ] } - if (host_os == "mac" && target_os != "mac" && - (target_cpu == "arm" || target_cpu == "arm64")) { - deps += [ ":create_arm_analyze_snapshot" ] - } - # Build analyze_snapshot for 64-bit target CPUs. if (target_cpu == "arm64") { deps += [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ] @@ -181,25 +179,6 @@ if (host_os == "mac" && target_os != "mac" && deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ] visibility = [ ":*" ] } - - copy("create_arm_analyze_snapshot") { - # The toolchain-specific output directory. For cross-compiles, this is a - # clang-x64 or clang-arm64 subdirectory of the top-level build directory. - host_output_dir = get_label_info( - "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)", - "root_out_dir") - - # Determine suffixed output gen_snapshot name. - target_cpu_suffix = target_cpu - if (target_cpu == "arm") { - target_cpu_suffix = "armv7" - } - - sources = [ "${host_output_dir}/analyze_snapshot" ] - outputs = [ "${host_output_dir}/analyze_snapshot_${target_cpu_suffix}" ] - deps = [ "$dart_src/runtime/bin:analyze_snapshot($host_toolchain)" ] - visibility = [ ":*" ] - } } # Creates a `gen_snapshot` binary suffixed with the target CPU architecture. @@ -258,6 +237,69 @@ if (host_os == "mac" && (target_os == "mac" || target_os == "ios")) { ":create_macos_gen_snapshot_x64_${target_cpu}", ] } + + # Added by shorebird. + # analyze_snapshot targets below were copied from the gen_snapshot targets + # above to allow us to include analyze_snapshot in the artifacts generated + # for create_ios_framework.py. + template("build_mac_analyze_snapshot") { + assert(defined(invoker.host_arch)) + host_cpu = invoker.host_arch + + build_toolchain = "//build/toolchain/mac:clang_$host_cpu" + analyze_snapshot_target_name = "analyze_snapshot" + + # At this point, the gen_snapshot equivalent changes + # gen_ snapshot_target_name to "gen_snapshot_host_targeting_host". There is + # no equivalent for analyze_snapshot, so we don't do that here. + # + # It's unclear whether we need to do so now, but we didn't previously, so + # we're not doing it now until we have a reason to. + + analyze_snapshot_target = + "$dart_src/runtime/bin:$analyze_snapshot_target_name($build_toolchain)" + + copy(target_name) { + # The toolchain-specific output directory. For cross-compiles, this is a + # clang-x64 or clang-arm64 subdirectory of the top-level build directory. + output_dir = get_label_info(analyze_snapshot_target, "root_out_dir") + + sources = [ "${output_dir}/${analyze_snapshot_target_name}" ] + outputs = [ + "${root_out_dir}/artifacts_$host_cpu/analyze_snapshot_${target_cpu}", + ] + deps = [ analyze_snapshot_target ] + } + } + + build_mac_analyze_snapshot( + "create_macos_analyze_snapshot_arm64_${target_cpu}") { + host_arch = "arm64" + } + + build_mac_analyze_snapshot( + "create_macos_analyze_snapshot_x64_${target_cpu}") { + host_arch = "x64" + } + + action("create_macos_analyze_snapshots") { + script = "//flutter/sky/tools/create_macos_binary.py" + outputs = [ "${root_out_dir}/analyze_snapshot_${target_cpu}" ] + args = [ + "--in-arm64", + rebase_path( + "${root_out_dir}/artifacts_arm64/analyze_snapshot_${target_cpu}"), + "--in-x64", + rebase_path( + "${root_out_dir}/artifacts_x64/analyze_snapshot_${target_cpu}"), + "--out", + rebase_path("${root_out_dir}/analyze_snapshot_${target_cpu}"), + ] + deps = [ + ":create_macos_analyze_snapshot_arm64_${target_cpu}", + ":create_macos_analyze_snapshot_x64_${target_cpu}", + ] + } } source_set("snapshot") { From 418754392b756705cb788e7269a7dade866165fe Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Tue, 17 Dec 2024 17:04:11 -0500 Subject: [PATCH 07/50] build windows --- shell/common/shorebird/BUILD.gn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shell/common/shorebird/BUILD.gn b/shell/common/shorebird/BUILD.gn index 4e31c785af768..0a28f76bce43b 100644 --- a/shell/common/shorebird/BUILD.gn +++ b/shell/common/shorebird/BUILD.gn @@ -31,6 +31,15 @@ source_set("shorebird") { ] include_dirs = [ "//flutter/updater" ] + + if (host_os == "win" && target_os == "win") { + if (target_cpu == "x64") { + libs = [ + "userenv.lib", + "//third_party/updater/target/x86_64-pc-windows-msvc/release/updater.lib", + ] + } + } } if (enable_unittests) { From a3eb71f574f2272d041e78aa66093af9c9ecf06e Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Wed, 18 Dec 2024 18:03:29 -0500 Subject: [PATCH 08/50] Windows Support --- shell/common/shorebird/shorebird.cc | 9 ++ shell/platform/embedder/embedder.cc | 2 + shell/platform/windows/BUILD.gn | 1 + .../windows/flutter_windows_engine.cc | 148 ++++++++++++++++++ 4 files changed, 160 insertions(+) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 89d49d68fafa1..5bcb5dda0689b 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -95,6 +95,7 @@ void ConfigureShorebird(std::string code_cache_path, const std::string& shorebird_yaml, const std::string& version, const std::string& version_code) { + FML_LOG(INFO) << "In ConfigureShorebird"; // If you are crashing here, you probably are running Shorebird in a Debug // config, where the AOT snapshot won't be linked into the process, and thus // lookups will fail. Change your Scheme to Release to fix: @@ -116,6 +117,7 @@ void ConfigureShorebird(std::string code_cache_path, bool init_result; // Using a block to make AppParameters lifetime explicit. { + FML_LOG(INFO) << "Constructing app parameters"; AppParameters app_parameters; // Combine version and version_code into a single string. // We could also pass these separately through to the updater if needed. @@ -127,6 +129,7 @@ void ConfigureShorebird(std::string code_cache_path, // https://stackoverflow.com/questions/26032039/convert-vectorstring-into-char-c std::vector c_paths{}; for (const auto& string : settings.application_library_path) { + FML_LOG(INFO) << "Pushing " << string << " to c_paths"; c_paths.push_back(string.c_str()); } // Do not modify application_library_path or c_strings will invalidate. @@ -134,9 +137,11 @@ void ConfigureShorebird(std::string code_cache_path, app_parameters.original_libapp_paths = c_paths.data(); app_parameters.original_libapp_paths_size = c_paths.size(); + FML_LOG(INFO) << "Calling shorebird_init"; // shorebird_init copies from app_parameters and shorebirdYaml. init_result = shorebird_init(&app_parameters, ShorebirdFileCallbacks(), shorebird_yaml.c_str()); + FML_LOG(INFO) << "init_result: " << init_result; } // We've decided not to support synchronous updates on launch for now. @@ -150,8 +155,10 @@ void ConfigureShorebird(std::string code_cache_path, SetBaseSnapshot(settings); #endif + FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); if (c_active_path != NULL) { + FML_LOG(INFO) << "Found active patch"; std::string active_path = c_active_path; shorebird_free_string(c_active_path); FML_LOG(INFO) << "Shorebird updater: active path: " << active_path; @@ -187,7 +194,9 @@ void ConfigureShorebird(std::string code_cache_path, // Once start_update_thread is called, the next_boot_patch* functions may // change their return values if the shorebird_report_launch_failed // function is called. + FML_LOG(INFO) << "Reporting launch start"; shorebird_report_launch_start(); + FML_LOG(INFO) << "Reported launch start"; if (shorebird_should_auto_update()) { FML_LOG(INFO) << "Starting Shorebird update"; diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 6f6ffc2b24df9..9010dae3b9825 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -2308,7 +2308,9 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, // Begin shorebird if (args->shorebird_args.shorebird_yaml_contents) { + FML_LOG(INFO) << "[shorebird] Shorebird YAML contents provided."; settings.application_library_path.push_back(args->shorebird_args.app_path); + FML_LOG(INFO) << "[shorebird] App path: " << args->shorebird_args.app_path; flutter::ConfigureShorebird(args->shorebird_args, settings); } else { FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; diff --git a/shell/platform/windows/BUILD.gn b/shell/platform/windows/BUILD.gn index e80662e592a72..c3439c90ea827 100644 --- a/shell/platform/windows/BUILD.gn +++ b/shell/platform/windows/BUILD.gn @@ -169,6 +169,7 @@ source_set("flutter_windows_source") { "//flutter/third_party/angle:libEGL_static", "//flutter/third_party/angle:libGLESv2_static", "//flutter/third_party/rapidjson", + "//flutter/third_party/tonic", ] } diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index d08591a10b520..48749eb701bfa 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -26,6 +26,7 @@ #include "flutter/shell/platform/windows/system_utils.h" #include "flutter/shell/platform/windows/task_runner.h" #include "flutter/third_party/accessibility/ax/ax_node.h" +#include "third_party/tonic/filesystem/filesystem/file.h" // winbase.h defines GetCurrentTime as a macro. #undef GetCurrentTime @@ -240,6 +241,93 @@ bool FlutterWindowsEngine::Run() { return Run(""); } +std::string GetReleaseVersion() +{ + char modulePath[MAX_PATH]; + // Get the full path of the currently running executable + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) + { + return "Error retrieving module file name."; + } + + // Get the size of the version information + DWORD handle = -1; + DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); + if (versionInfoSize == -1) + { + return "Error retrieving version info size."; + } + + // Allocate memory for version info + std::vector versionData(versionInfoSize); + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) + { + return "Error retrieving version info."; + } + + // Get the version info structure + VS_FIXEDFILEINFO* fileInfo = nullptr; + UINT fileInfoSize = -1; + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) + { + return "Error querying version info."; + } + + if (fileInfo) + { + // Extract version numbers + DWORD major = HIWORD(fileInfo->dwFileVersionMS); + DWORD minor = LOWORD(fileInfo->dwFileVersionMS); + DWORD build = HIWORD(fileInfo->dwFileVersionLS); + + char version[49]; + snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); + return std::string(version); + } + + return "No version information available."; +} + +int GetBuildNumber() +{ + char modulePath[MAX_PATH]; + // Get the full path of the currently running executable + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) + { + return -1; + } + + // Get the size of the version information + DWORD handle = -1; + DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); + if (versionInfoSize == -1) + { + return -1; + } + + // Allocate memory for version info + std::vector versionData(versionInfoSize); + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) + { + return -1; + } + + // Get the version info structure + VS_FIXEDFILEINFO* fileInfo = nullptr; + UINT fileInfoSize = -1; + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) + { + return -1; + } + + if (fileInfo) + { + return LOWORD(fileInfo->dwFileVersionLS); + } + + return -1; +} + bool FlutterWindowsEngine::Run(std::string_view entrypoint) { if (!project_->HasValidPaths()) { FML_LOG(ERROR) << "Missing or unresolvable paths to assets."; @@ -297,7 +385,9 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.struct_size = sizeof(FlutterProjectArgs); args.shutdown_dart_vm_when_done = true; args.assets_path = assets_path_string.c_str(); + FML_LOG(INFO) << assets_path_string; args.icu_data_path = icu_path_string.c_str(); + FML_LOG(INFO) << "ICU path " << icu_path_string; args.command_line_argc = static_cast(argv.size()); args.command_line_argv = argv.empty() ? nullptr : argv.data(); @@ -370,6 +460,15 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { host->root_isolate_create_callback_(); } }; + // Copied from shell\platform\darwin\macos\framework\Source\FlutterEngine.mm + // Writes log messages to stdout. + args.log_message_callback = [](const char* tag, const char* message, + void* user_data) { + if (tag && tag[0]) { + std::cout << tag << ": "; + } + std::cout << message << std::endl; + }; args.channel_update_callback = [](const FlutterChannelUpdate* update, void* user_data) { auto host = static_cast(user_data); @@ -382,6 +481,52 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.custom_task_runners = &custom_task_runners; + auto shorebird_yaml_path = fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); + std::string* shorebird_yaml_contents = new std::string(); + if (filesystem::ReadFileToString(shorebird_yaml_path, shorebird_yaml_contents)) { + FML_LOG(INFO) << "Read shorebird.yaml"; + FML_LOG(INFO) << shorebird_yaml_contents->c_str(); + args.shorebird_args.shorebird_yaml_contents = shorebird_yaml_contents->c_str(); + } + // FML_LOG(INFO) << "Caches dir " << fml::paths::GetCachesDirectory().get(); + args.shorebird_args.cache_path = "C:\\Users\\bryan\\AppData\\Local\\shorebird"; + auto appVersion = GetReleaseVersion(); + args.shorebird_args.app_version = appVersion.c_str(); + auto buildNumber = GetBuildNumber(); + auto buildNumberStr = std::to_string(buildNumber); + args.shorebird_args.app_build_number = buildNumberStr.c_str(); + args.shorebird_args.app_path = "C:\\Users\\bryan\\Desktop\\build\\windows\\app.so"; + + + // BEGIN macos logic + // NSString* bundlePath = + // [[NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL + // URLByAppendingPathComponent:@"App.framework"]] bundlePath]; + // bundlePath = [bundlePath stringByAppendingString:@"/App"]; + // flutterArguments.shorebird_args.app_path = bundlePath.UTF8String; + // NSString* assetsPath = _project.assetsPath; + // NSURL* shorebirdYamlPath = [NSURL URLWithString:@"shorebird.yaml" + // relativeToURL:[NSURL fileURLWithPath:assetsPath]]; + // NSString* shorebirdYamlContents = [NSString stringWithContentsOfURL:shorebirdYamlPath + // encoding:NSUTF8StringEncoding + // error:nil]; + // NSString* appVersion = + // [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; + // NSString* appBuildNumber = [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; + // flutterArguments.shorebird_args.app_version = appVersion.UTF8String; + // flutterArguments.shorebird_args.app_build_number = appBuildNumber.UTF8String; + + // std::string cache_path = + // fml::paths::JoinPaths({getenv("HOME"), "Library", "Application Support", "shorebird"}); + // flutterArguments.shorebird_args.cache_path = cache_path.c_str(); + // flutterArguments.shorebird_args.shorebird_yaml_contents = shorebirdYamlContents.UTF8String; + // END macos logic + + // assets path is C:\Users\bryan\Documents\sandbox\hello_windows\build\windows\x64\runner\Release\data\flutter_assets + + // _embedderAPI.Initialize seems to be called by the FlutterEngineRun (visible + // to us here as embedder_api_.Run). + if (!platform_view_plugin_) { platform_view_plugin_ = std::make_unique( messenger_wrapper_.get(), task_runner_.get()); @@ -480,6 +625,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { return true; } + bool FlutterWindowsEngine::Stop() { if (engine_) { for (const auto& [callback, registrar] : @@ -901,9 +1047,11 @@ void FlutterWindowsEngine::OnPreEngineRestart() { } std::string FlutterWindowsEngine::GetExecutableName() const { + FML_LOG(INFO) << "In GetExecutableName"; std::pair result = fml::paths::GetExecutablePath(); if (result.first) { const std::string& executable_path = result.second; + FML_LOG(INFO) << "executable_path: " << executable_path; size_t last_separator = executable_path.find_last_of("/\\"); if (last_separator == std::string::npos || last_separator == executable_path.size() - 1) { From ae4548217e13b333fdd6c6f194c515619b13a4ad Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Wed, 18 Dec 2024 18:04:50 -0500 Subject: [PATCH 09/50] Format --- .../windows/flutter_windows_engine.cc | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 48749eb701bfa..46d34c7c6bddc 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -241,40 +241,34 @@ bool FlutterWindowsEngine::Run() { return Run(""); } -std::string GetReleaseVersion() -{ +std::string GetReleaseVersion() { char modulePath[MAX_PATH]; // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) - { + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { return "Error retrieving module file name."; } // Get the size of the version information DWORD handle = -1; DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) - { + if (versionInfoSize == -1) { return "Error retrieving version info size."; } // Allocate memory for version info std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) - { + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { return "Error retrieving version info."; } // Get the version info structure VS_FIXEDFILEINFO* fileInfo = nullptr; UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) - { + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { return "Error querying version info."; } - if (fileInfo) - { + if (fileInfo) { // Extract version numbers DWORD major = HIWORD(fileInfo->dwFileVersionMS); DWORD minor = LOWORD(fileInfo->dwFileVersionMS); @@ -288,40 +282,34 @@ std::string GetReleaseVersion() return "No version information available."; } -int GetBuildNumber() -{ +int GetBuildNumber() { char modulePath[MAX_PATH]; // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) - { + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { return -1; } // Get the size of the version information DWORD handle = -1; DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) - { + if (versionInfoSize == -1) { return -1; } // Allocate memory for version info std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) - { + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { return -1; } // Get the version info structure VS_FIXEDFILEINFO* fileInfo = nullptr; UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) - { + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { return -1; } - if (fileInfo) - { + if (fileInfo) { return LOWORD(fileInfo->dwFileVersionLS); } From 4c1e0687512d9ddd3bf3c5832fde907ea0aaf570 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Thu, 19 Dec 2024 13:18:35 -0500 Subject: [PATCH 10/50] Make patching work --- shell/common/shell.cc | 2 +- shell/common/shorebird/shorebird.cc | 7 ++- shell/platform/embedder/embedder.cc | 4 ++ .../windows/flutter_project_bundle.cc | 20 +++++-- .../platform/windows/flutter_project_bundle.h | 2 + .../windows/flutter_windows_engine.cc | 58 +++++++++---------- 6 files changed, 52 insertions(+), 41 deletions(-) diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 0878c020de259..8ba5817ed5f35 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -444,7 +444,7 @@ Shell::Shell(DartVMRef vm, weak_factory_gpu_(nullptr), weak_factory_(this) { // FIXME: This is probably the wrong place to hook into. -#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX +#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX || FML_OS_WINDOWS if (!vm_) { shorebird_report_launch_failure(); } else { diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 5bcb5dda0689b..eb162b06dc979 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -100,8 +100,11 @@ void ConfigureShorebird(std::string code_cache_path, // config, where the AOT snapshot won't be linked into the process, and thus // lookups will fail. Change your Scheme to Release to fix: // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode - FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) - << "XCode Scheme must be set to Release to use Shorebird"; + // FIXME: This was commented out because the windows flutter engine does not + // populate the settings snapshots. Ideally we would call + // ConfigureShorebird from the embedder and this would be uncommented. + // FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) + // << "XCode Scheme must be set to Release to use Shorebird"; auto shorebird_updater_dir_name = "shorebird_updater"; diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 9010dae3b9825..44b1b77bb3a7a 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -1972,6 +1972,7 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, flutter::Settings settings = flutter::SettingsFromCommandLine(command_line); + // First access of args aot_data if (SAFE_ACCESS(args, aot_data, nullptr)) { if (SAFE_ACCESS(args, vm_snapshot_data, nullptr) || SAFE_ACCESS(args, vm_snapshot_instructions, nullptr) || @@ -1985,6 +1986,9 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, } if (flutter::DartVM::IsRunningPrecompiledCode()) { + // WIN: We need to get aot_data into args before here + // AOT data is loaded from the snapshot in + // shell\platform\windows\flutter_project_bundle.cc PopulateAOTSnapshotMappingCallbacks(args, settings); } else { PopulateJITSnapshotMappingCallbacks(args, settings); diff --git a/shell/platform/windows/flutter_project_bundle.cc b/shell/platform/windows/flutter_project_bundle.cc index aab3239ce8291..b1e10863549cb 100644 --- a/shell/platform/windows/flutter_project_bundle.cc +++ b/shell/platform/windows/flutter_project_bundle.cc @@ -55,19 +55,22 @@ bool FlutterProjectBundle::HasValidPaths() { // Attempts to load AOT data from the given path, which must be absolute and // non-empty. Logs and returns nullptr on failure. -UniqueAotDataPtr FlutterProjectBundle::LoadAotData( - const FlutterEngineProcTable& engine_procs) { - if (aot_library_path_.empty()) { +UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( + std::filesystem::path aot_library_path, + const FlutterEngineProcTable& engine_procs +) { + if (aot_library_path.empty()) { FML_LOG(ERROR) << "Attempted to load AOT data, but no aot_library_path was provided."; return UniqueAotDataPtr(nullptr, nullptr); } - if (!std::filesystem::exists(aot_library_path_)) { + if (!std::filesystem::exists(aot_library_path)) { FML_LOG(ERROR) << "Can't load AOT data from " - << aot_library_path_.u8string() << "; no such file."; + << aot_library_path.u8string() << "; no such file."; return UniqueAotDataPtr(nullptr, nullptr); } - std::string path_string = aot_library_path_.u8string(); + FML_LOG(INFO) << "Loading aot_data from " << aot_library_path.u8string(); + std::string path_string = aot_library_path.u8string(); FlutterEngineAOTDataSource source = {}; source.type = kFlutterEngineAOTDataSourceTypeElfPath; source.elf_path = path_string.c_str(); @@ -80,6 +83,11 @@ UniqueAotDataPtr FlutterProjectBundle::LoadAotData( return UniqueAotDataPtr(data, engine_procs.CollectAOTData); } +UniqueAotDataPtr FlutterProjectBundle::LoadAotData( + const FlutterEngineProcTable& engine_procs) { + return FlutterProjectBundle::LoadAotDataStatic(aot_library_path_, engine_procs); +} + FlutterProjectBundle::~FlutterProjectBundle() {} void FlutterProjectBundle::SetSwitches( diff --git a/shell/platform/windows/flutter_project_bundle.h b/shell/platform/windows/flutter_project_bundle.h index 09770b5c094fc..2733f28556e1f 100644 --- a/shell/platform/windows/flutter_project_bundle.h +++ b/shell/platform/windows/flutter_project_bundle.h @@ -50,6 +50,8 @@ class FlutterProjectBundle { // Logs and returns nullptr on failure. UniqueAotDataPtr LoadAotData(const FlutterEngineProcTable& engine_procs); + static UniqueAotDataPtr LoadAotDataStatic(std::filesystem::path aot_library_path, const FlutterEngineProcTable& engine_procs); + // Returns the Dart entrypoint. const std::string& dart_entrypoint() const { return dart_entrypoint_; } diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 46d34c7c6bddc..10569b5e0de3f 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -14,6 +14,8 @@ #include "flutter/fml/paths.h" #include "flutter/fml/platform/win/wstring_conversion.h" #include "flutter/fml/synchronization/waitable_event.h" +#include "flutter/shell/common/shorebird/shorebird.h" +#include "flutter/shell/common/switches.h" #include "flutter/shell/platform/common/client_wrapper/binary_messenger_impl.h" #include "flutter/shell/platform/common/client_wrapper/include/flutter/standard_message_codec.h" #include "flutter/shell/platform/common/path_utils.h" @@ -323,6 +325,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { } std::string assets_path_string = project_->assets_path().u8string(); std::string icu_path_string = project_->icu_path().u8string(); + // This loads AOT data from the project_'s aot_library_path_. if (embedder_api_.RunsAOTCompiledDartCode()) { aot_data_ = project_->LoadAotData(embedder_api_); if (!aot_data_) { @@ -373,9 +376,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.struct_size = sizeof(FlutterProjectArgs); args.shutdown_dart_vm_when_done = true; args.assets_path = assets_path_string.c_str(); - FML_LOG(INFO) << assets_path_string; args.icu_data_path = icu_path_string.c_str(); - FML_LOG(INFO) << "ICU path " << icu_path_string; args.command_line_argc = static_cast(argv.size()); args.command_line_argv = argv.empty() ? nullptr : argv.data(); @@ -476,41 +477,13 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { FML_LOG(INFO) << shorebird_yaml_contents->c_str(); args.shorebird_args.shorebird_yaml_contents = shorebird_yaml_contents->c_str(); } - // FML_LOG(INFO) << "Caches dir " << fml::paths::GetCachesDirectory().get(); - args.shorebird_args.cache_path = "C:\\Users\\bryan\\AppData\\Local\\shorebird"; + args.shorebird_args.cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; auto appVersion = GetReleaseVersion(); args.shorebird_args.app_version = appVersion.c_str(); auto buildNumber = GetBuildNumber(); auto buildNumberStr = std::to_string(buildNumber); args.shorebird_args.app_build_number = buildNumberStr.c_str(); - args.shorebird_args.app_path = "C:\\Users\\bryan\\Desktop\\build\\windows\\app.so"; - - - // BEGIN macos logic - // NSString* bundlePath = - // [[NSBundle bundleWithURL:[NSBundle.mainBundle.privateFrameworksURL - // URLByAppendingPathComponent:@"App.framework"]] bundlePath]; - // bundlePath = [bundlePath stringByAppendingString:@"/App"]; - // flutterArguments.shorebird_args.app_path = bundlePath.UTF8String; - // NSString* assetsPath = _project.assetsPath; - // NSURL* shorebirdYamlPath = [NSURL URLWithString:@"shorebird.yaml" - // relativeToURL:[NSURL fileURLWithPath:assetsPath]]; - // NSString* shorebirdYamlContents = [NSString stringWithContentsOfURL:shorebirdYamlPath - // encoding:NSUTF8StringEncoding - // error:nil]; - // NSString* appVersion = - // [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - // NSString* appBuildNumber = [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleVersion"]; - // flutterArguments.shorebird_args.app_version = appVersion.UTF8String; - // flutterArguments.shorebird_args.app_build_number = appBuildNumber.UTF8String; - - // std::string cache_path = - // fml::paths::JoinPaths({getenv("HOME"), "Library", "Application Support", "shorebird"}); - // flutterArguments.shorebird_args.cache_path = cache_path.c_str(); - // flutterArguments.shorebird_args.shorebird_yaml_contents = shorebirdYamlContents.UTF8String; - // END macos logic - - // assets path is C:\Users\bryan\Documents\sandbox\hello_windows\build\windows\x64\runner\Release\data\flutter_assets + args.shorebird_args.app_path = R"(C:\Users\bryan\Desktop\build\windows\x64\runner\Release\data\app.so)"; // _embedderAPI.Initialize seems to be called by the FlutterEngineRun (visible // to us here as embedder_api_.Run). @@ -558,6 +531,27 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { }; args.compositor = &compositor; + // FIXME + // The following was copied from the embedder. Ideally it would live there, + // but we need to populate args.aot_data with our patch, and we only know + // whether we have a patch (and where it is) after we've called + // ConfigureShorebird. + if (args.shorebird_args.shorebird_yaml_contents) { + fml::CommandLine command_line; + flutter::Settings settings = flutter::SettingsFromCommandLine(command_line); + + FML_LOG(INFO) << "[shorebird] Shorebird YAML contents provided."; + settings.application_library_path.push_back(args.shorebird_args.app_path); + flutter::ConfigureShorebird(args.shorebird_args, settings); + // settings.application_library_path has been modified by ConfigureShorebird + // to include the patch path, if one exists. + auto maybe_patch_path = settings.application_library_path.back(); + FML_LOG(INFO) << "[shorebird] Maybe patch path: " << maybe_patch_path; + aot_data_ = FlutterProjectBundle::LoadAotDataStatic(maybe_patch_path, embedder_api_); + } else { + FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; + } + if (aot_data_) { args.aot_data = aot_data_.get(); } From 1b834b34a0968e1f713d21890895cc17bf902d60 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Thu, 19 Dec 2024 13:21:11 -0500 Subject: [PATCH 11/50] Formatting --- .../windows/flutter_project_bundle.cc | 10 +- .../platform/windows/flutter_project_bundle.h | 4 +- .../windows/flutter_windows_engine.cc | 118 +++++++++--------- 3 files changed, 68 insertions(+), 64 deletions(-) diff --git a/shell/platform/windows/flutter_project_bundle.cc b/shell/platform/windows/flutter_project_bundle.cc index b1e10863549cb..bff8807c828c4 100644 --- a/shell/platform/windows/flutter_project_bundle.cc +++ b/shell/platform/windows/flutter_project_bundle.cc @@ -57,16 +57,15 @@ bool FlutterProjectBundle::HasValidPaths() { // non-empty. Logs and returns nullptr on failure. UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( std::filesystem::path aot_library_path, - const FlutterEngineProcTable& engine_procs -) { + const FlutterEngineProcTable& engine_procs) { if (aot_library_path.empty()) { FML_LOG(ERROR) << "Attempted to load AOT data, but no aot_library_path was provided."; return UniqueAotDataPtr(nullptr, nullptr); } if (!std::filesystem::exists(aot_library_path)) { - FML_LOG(ERROR) << "Can't load AOT data from " - << aot_library_path.u8string() << "; no such file."; + FML_LOG(ERROR) << "Can't load AOT data from " << aot_library_path.u8string() + << " no such file."; return UniqueAotDataPtr(nullptr, nullptr); } FML_LOG(INFO) << "Loading aot_data from " << aot_library_path.u8string(); @@ -85,7 +84,8 @@ UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( UniqueAotDataPtr FlutterProjectBundle::LoadAotData( const FlutterEngineProcTable& engine_procs) { - return FlutterProjectBundle::LoadAotDataStatic(aot_library_path_, engine_procs); + return FlutterProjectBundle::LoadAotDataStatic(aot_library_path_, + engine_procs); } FlutterProjectBundle::~FlutterProjectBundle() {} diff --git a/shell/platform/windows/flutter_project_bundle.h b/shell/platform/windows/flutter_project_bundle.h index 2733f28556e1f..595c946fd9022 100644 --- a/shell/platform/windows/flutter_project_bundle.h +++ b/shell/platform/windows/flutter_project_bundle.h @@ -50,7 +50,9 @@ class FlutterProjectBundle { // Logs and returns nullptr on failure. UniqueAotDataPtr LoadAotData(const FlutterEngineProcTable& engine_procs); - static UniqueAotDataPtr LoadAotDataStatic(std::filesystem::path aot_library_path, const FlutterEngineProcTable& engine_procs); + static UniqueAotDataPtr LoadAotDataStatic( + std::filesystem::path aot_library_path, + const FlutterEngineProcTable& engine_procs); // Returns the Dart entrypoint. const std::string& dart_entrypoint() const { return dart_entrypoint_; } diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 10569b5e0de3f..bf04513bd67b6 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -243,79 +243,81 @@ bool FlutterWindowsEngine::Run() { return Run(""); } +// FIXME: This and the following function were generated by copilot. They work, +// but that's about all you can say for them. std::string GetReleaseVersion() { - char modulePath[MAX_PATH]; - // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return "Error retrieving module file name."; - } + char modulePath[MAX_PATH]; + // Get the full path of the currently running executable + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { + return "Error retrieving module file name."; + } - // Get the size of the version information - DWORD handle = -1; - DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) { - return "Error retrieving version info size."; - } + // Get the size of the version information + DWORD handle = -1; + DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); + if (versionInfoSize == -1) { + return "Error retrieving version info size."; + } - // Allocate memory for version info - std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { - return "Error retrieving version info."; - } + // Allocate memory for version info + std::vector versionData(versionInfoSize); + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { + return "Error retrieving version info."; + } - // Get the version info structure - VS_FIXEDFILEINFO* fileInfo = nullptr; - UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { - return "Error querying version info."; - } + // Get the version info structure + VS_FIXEDFILEINFO* fileInfo = nullptr; + UINT fileInfoSize = -1; + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { + return "Error querying version info."; + } - if (fileInfo) { - // Extract version numbers - DWORD major = HIWORD(fileInfo->dwFileVersionMS); - DWORD minor = LOWORD(fileInfo->dwFileVersionMS); - DWORD build = HIWORD(fileInfo->dwFileVersionLS); + if (fileInfo) { + // Extract version numbers + DWORD major = HIWORD(fileInfo->dwFileVersionMS); + DWORD minor = LOWORD(fileInfo->dwFileVersionMS); + DWORD build = HIWORD(fileInfo->dwFileVersionLS); - char version[49]; - snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); - return std::string(version); - } + char version[49]; + snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); + return std::string(version); + } - return "No version information available."; + return "No version information available."; } int GetBuildNumber() { - char modulePath[MAX_PATH]; - // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return -1; - } + char modulePath[MAX_PATH]; + // Get the full path of the currently running executable + if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { + return -1; + } - // Get the size of the version information - DWORD handle = -1; - DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) { - return -1; - } + // Get the size of the version information + DWORD handle = -1; + DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); + if (versionInfoSize == -1) { + return -1; + } - // Allocate memory for version info - std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { - return -1; - } + // Allocate memory for version info + std::vector versionData(versionInfoSize); + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { + return -1; + } - // Get the version info structure - VS_FIXEDFILEINFO* fileInfo = nullptr; - UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { - return -1; - } + // Get the version info structure + VS_FIXEDFILEINFO* fileInfo = nullptr; + UINT fileInfoSize = -1; + if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { + return -1; + } - if (fileInfo) { - return LOWORD(fileInfo->dwFileVersionLS); - } + if (fileInfo) { + return LOWORD(fileInfo->dwFileVersionLS); + } - return -1; + return -1; } bool FlutterWindowsEngine::Run(std::string_view entrypoint) { From f871d4fed870b7c206433650666480364a00738f Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Thu, 19 Dec 2024 13:24:37 -0500 Subject: [PATCH 12/50] Formatting --- .../windows/flutter_project_bundle.cc | 4 +- .../windows/flutter_windows_engine.cc | 57 +++++++++++-------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/shell/platform/windows/flutter_project_bundle.cc b/shell/platform/windows/flutter_project_bundle.cc index bff8807c828c4..2c77f2ea00b39 100644 --- a/shell/platform/windows/flutter_project_bundle.cc +++ b/shell/platform/windows/flutter_project_bundle.cc @@ -56,8 +56,8 @@ bool FlutterProjectBundle::HasValidPaths() { // Attempts to load AOT data from the given path, which must be absolute and // non-empty. Logs and returns nullptr on failure. UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( - std::filesystem::path aot_library_path, - const FlutterEngineProcTable& engine_procs) { + std::filesystem::path aot_library_path, + const FlutterEngineProcTable& engine_procs) { if (aot_library_path.empty()) { FML_LOG(ERROR) << "Attempted to load AOT data, but no aot_library_path was provided."; diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index bf04513bd67b6..bbbe2882a2d72 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -249,38 +249,40 @@ std::string GetReleaseVersion() { char modulePath[MAX_PATH]; // Get the full path of the currently running executable if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return "Error retrieving module file name."; + return "Error retrieving module file name."; } // Get the size of the version information DWORD handle = -1; DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); if (versionInfoSize == -1) { - return "Error retrieving version info size."; + return "Error retrieving version info size."; } // Allocate memory for version info std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { - return "Error retrieving version info."; + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, + versionData.data())) { + return "Error retrieving version info."; } // Get the version info structure VS_FIXEDFILEINFO* fileInfo = nullptr; UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { - return "Error querying version info."; + if (!VerQueryValueA(versionData.data(), "\\", + reinterpret_cast(&fileInfo), &fileInfoSize)) { + return "Error querying version info."; } if (fileInfo) { - // Extract version numbers - DWORD major = HIWORD(fileInfo->dwFileVersionMS); - DWORD minor = LOWORD(fileInfo->dwFileVersionMS); - DWORD build = HIWORD(fileInfo->dwFileVersionLS); - - char version[49]; - snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); - return std::string(version); + // Extract version numbers + DWORD major = HIWORD(fileInfo->dwFileVersionMS); + DWORD minor = LOWORD(fileInfo->dwFileVersionMS); + DWORD build = HIWORD(fileInfo->dwFileVersionLS); + + char version[49]; + snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); + return std::string(version); } return "No version information available."; @@ -302,19 +304,21 @@ int GetBuildNumber() { // Allocate memory for version info std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { + if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, + versionData.data())) { return -1; } // Get the version info structure VS_FIXEDFILEINFO* fileInfo = nullptr; UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { + if (!VerQueryValueA(versionData.data(), "\\", + reinterpret_cast(&fileInfo), &fileInfoSize)) { return -1; } if (fileInfo) { - return LOWORD(fileInfo->dwFileVersionLS); + return LOWORD(fileInfo->dwFileVersionLS); } return -1; @@ -454,7 +458,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { // Copied from shell\platform\darwin\macos\framework\Source\FlutterEngine.mm // Writes log messages to stdout. args.log_message_callback = [](const char* tag, const char* message, - void* user_data) { + void* user_data) { if (tag && tag[0]) { std::cout << tag << ": "; } @@ -472,12 +476,13 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.custom_task_runners = &custom_task_runners; - auto shorebird_yaml_path = fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); + auto shorebird_yaml_path = + fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); std::string* shorebird_yaml_contents = new std::string(); - if (filesystem::ReadFileToString(shorebird_yaml_path, shorebird_yaml_contents)) { - FML_LOG(INFO) << "Read shorebird.yaml"; - FML_LOG(INFO) << shorebird_yaml_contents->c_str(); - args.shorebird_args.shorebird_yaml_contents = shorebird_yaml_contents->c_str(); + if (filesystem::ReadFileToString(shorebird_yaml_path, + shorebird_yaml_contents)) { + args.shorebird_args.shorebird_yaml_contents = + shorebird_yaml_contents->c_str(); } args.shorebird_args.cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; auto appVersion = GetReleaseVersion(); @@ -485,7 +490,8 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto buildNumber = GetBuildNumber(); auto buildNumberStr = std::to_string(buildNumber); args.shorebird_args.app_build_number = buildNumberStr.c_str(); - args.shorebird_args.app_path = R"(C:\Users\bryan\Desktop\build\windows\x64\runner\Release\data\app.so)"; + args.shorebird_args.app_path = + R"(C:\Users\bryan\Desktop\build\windows\x64\runner\Release\data\app.so)"; // _embedderAPI.Initialize seems to be called by the FlutterEngineRun (visible // to us here as embedder_api_.Run). @@ -549,7 +555,8 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { // to include the patch path, if one exists. auto maybe_patch_path = settings.application_library_path.back(); FML_LOG(INFO) << "[shorebird] Maybe patch path: " << maybe_patch_path; - aot_data_ = FlutterProjectBundle::LoadAotDataStatic(maybe_patch_path, embedder_api_); + aot_data_ = FlutterProjectBundle::LoadAotDataStatic(maybe_patch_path, + embedder_api_); } else { FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; } From a63c7b31b199f1254ffbbfff93b745083c775e76 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Thu, 19 Dec 2024 13:25:01 -0500 Subject: [PATCH 13/50] Formatting --- shell/platform/windows/flutter_windows_engine.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index bbbe2882a2d72..536801ce0ad71 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -616,7 +616,6 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { return true; } - bool FlutterWindowsEngine::Stop() { if (engine_) { for (const auto& [callback, registrar] : From 8bf5e5b06ea1eced89f5f4b4fad9211209979709 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:00:42 -0500 Subject: [PATCH 14/50] Improve windows --- shell/common/BUILD.gn | 7 ++ shell/common/shorebird/shorebird.cc | 110 ++++++++++++++++++ shell/common/shorebird/shorebird.h | 21 ++++ shell/platform/embedder/embedder.cc | 4 - .../platform/windows/flutter_project_bundle.h | 4 + .../windows/flutter_windows_engine.cc | 71 +++++------ 6 files changed, 171 insertions(+), 46 deletions(-) diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 5e4b4d1f2c6f8..390a7b97f306c 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -172,6 +172,13 @@ source_set("common") { "//third_party/updater/target/x86_64-apple-darwin/release/libupdater.a", ] } + } else if (host_os == "win" && target_os == "win") { + if (target_cpu == "x64") { + libs = [ + "userenv.lib", + "//third_party/updater/target/x86_64-pc-windows-msvc/release/updater.lib", + ] + } } } diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index eb162b06dc979..076fab7927568 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -79,6 +79,116 @@ FileCallbacks ShorebirdFileCallbacks() { }; } +std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { + FML_LOG(INFO) << "In ConfigureShorebird"; + // If you are crashing here, you probably are running Shorebird in a Debug + // config, where the AOT snapshot won't be linked into the process, and thus + // lookups will fail. Change your Scheme to Release to fix: + // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode + // FIXME: This was commented out because the windows flutter engine does not + // populate the settings snapshots. Ideally we would call + // ConfigureShorebird from the embedder and this would be uncommented. + // FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) + // << "XCode Scheme must be set to Release to use Shorebird"; + + auto shorebird_updater_dir_name = "shorebird_updater"; + + auto code_cache_dir = fml::paths::JoinPaths( + {std::move(args.code_cache_path), shorebird_updater_dir_name}); + auto app_storage_dir = fml::paths::JoinPaths( + {std::move(args.app_storage_path), shorebird_updater_dir_name}); + + fml::CreateDirectory(fml::paths::GetCachesDirectory(), + {shorebird_updater_dir_name}, + fml::FilePermission::kReadWrite); + + bool init_result; + // Using a block to make AppParameters lifetime explicit. + { + FML_LOG(INFO) << "Constructing app parameters"; + AppParameters app_parameters; + // Combine version and version_code into a single string. + // We could also pass these separately through to the updater if needed. + auto release_version = args.version + "+" + args.version_code; + app_parameters.release_version = release_version.c_str(); + app_parameters.code_cache_dir = code_cache_dir.c_str(); + app_parameters.app_storage_dir = app_storage_dir.c_str(); + + // https://stackoverflow.com/questions/26032039/convert-vectorstring-into-char-c + std::vector c_paths{}; + c_paths.push_back(args.release_app_library_path.c_str()); + // for (const auto& string : settings.application_library_path) { + // FML_LOG(INFO) << "Pushing " << string << " to c_paths"; + // c_paths.push_back(string.c_str()); + // } + // Do not modify application_library_path or c_strings will invalidate. + + app_parameters.original_libapp_paths = c_paths.data(); + app_parameters.original_libapp_paths_size = c_paths.size(); + + FML_LOG(INFO) << "Calling shorebird_init"; + // shorebird_init copies from app_parameters and shorebirdYaml. + init_result = shorebird_init(&app_parameters, ShorebirdFileCallbacks(), + args.shorebird_yaml.c_str()); + FML_LOG(INFO) << "init_result: " << init_result; + } + + // We've decided not to support synchronous updates on launch for now. + // It's a terrible user experience (having the app hang on launch) and + // instead we will provide examples of how to build a custom update UI + // within Dart, including updating as part of login, etc. + // https://github.com/shorebirdtech/shorebird/issues/950 + + // We only set the base snapshot on iOS for now. +#if FML_OS_IOS || FML_OS_MACOSX + SetBaseSnapshot(settings); +#endif + + FML_LOG(INFO) << "Checking for active patch"; + char* c_active_path = shorebird_next_boot_patch_path(); + std::string active_path = ""; + if (c_active_path != NULL) { + FML_LOG(INFO) << "Found active patch!"; + active_path = c_active_path; + shorebird_free_string(c_active_path); + FML_LOG(INFO) << "Shorebird updater: patch path: " << active_path; + } else { + FML_LOG(INFO) << "Shorebird updater: no active patch."; + } + + // We are careful only to report a launch start in the case where it's the + // first time we've configured shorebird this process. Otherwise we could end + // up in a case where we report a launch start, but never a completion (e.g. + // from package:flutter_work_manager which sometimes creates a FlutterEngine + // (and thus configures shorebird) but never runs it. The proper fix for this + // is probably to move the launch_start() call to be later in the lifecycle + // (when the snapshot is loaded and run, rather than when FlutterEngine is + // initialized). This "hack" will still have a problem where FlutterEngine is + // initialized but never run before the app is quit, could still cause us to + // suddenly mark-bad a patch that was never actually attempted to launch. + if (!init_result) { + return ""; + } + + // Once start_update_thread is called, the next_boot_patch* functions may + // change their return values if the shorebird_report_launch_failed + // function is called. + FML_LOG(INFO) << "Reporting launch start"; + shorebird_report_launch_start(); + FML_LOG(INFO) << "Reported launch start"; + + if (shorebird_should_auto_update()) { + FML_LOG(INFO) << "Starting Shorebird update"; + shorebird_start_update_thread(); + } else { + FML_LOG(INFO) + << "Shorebird auto_update disabled, not checking for updates."; + } + + FML_LOG(INFO) << "Returning active path: " << active_path; + return active_path; +} + void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, flutter::Settings& settings) { // cache_path is used for both code_cache and app_storage, as we don't persist diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index 1c6cb8bcd4443..69878a6aca9b3 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -6,6 +6,27 @@ namespace flutter { +struct ShorebirdConfigArgs { + std::string code_cache_path; + std::string app_storage_path; + std::string release_app_library_path; + const std::string& shorebird_yaml; + const std::string& version; + const std::string& version_code; + + // constructor + ShorebirdConfigArgs( + std::string code_cache_path, + std::string app_storage_path, + std::string release_app_library_path, + const std::string& shorebird_yaml, + const std::string& version, + const std::string& version_code) : + code_cache_path(code_cache_path), app_storage_path(app_storage_path), release_app_library_path(release_app_library_path), shorebird_yaml(shorebird_yaml), version(version), version_code(version_code) {} +}; + +std::string ConfigureShorebird(const ShorebirdConfigArgs& args); + void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, flutter::Settings& settings); diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 44b1b77bb3a7a..35836436a63d7 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -2312,12 +2312,8 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, // Begin shorebird if (args->shorebird_args.shorebird_yaml_contents) { - FML_LOG(INFO) << "[shorebird] Shorebird YAML contents provided."; settings.application_library_path.push_back(args->shorebird_args.app_path); - FML_LOG(INFO) << "[shorebird] App path: " << args->shorebird_args.app_path; flutter::ConfigureShorebird(args->shorebird_args, settings); - } else { - FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; } // End shorebird diff --git a/shell/platform/windows/flutter_project_bundle.h b/shell/platform/windows/flutter_project_bundle.h index 595c946fd9022..65da97bf45c7f 100644 --- a/shell/platform/windows/flutter_project_bundle.h +++ b/shell/platform/windows/flutter_project_bundle.h @@ -44,6 +44,10 @@ class FlutterProjectBundle { // Sets engine switches. void SetSwitches(const std::vector& switches); + void SetAotLibraryPath(const std::filesystem::path& aot_library_path) { + aot_library_path_ = aot_library_path; + } + // Attempts to load AOT data for this bundle. The returned data must be // retained until any engine instance it is passed to has been shut down. // diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 536801ce0ad71..06aebba7d6ddf 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -331,6 +331,35 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { } std::string assets_path_string = project_->assets_path().u8string(); std::string icu_path_string = project_->icu_path().u8string(); + auto shorebird_yaml_path = + fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); + std::string* shorebird_yaml_contents = new std::string(); + if (filesystem::ReadFileToString(shorebird_yaml_path, + shorebird_yaml_contents)) { + auto code_cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; + auto appVersion = GetReleaseVersion(); + auto buildNumber = GetBuildNumber(); + auto buildNumberStr = std::to_string(buildNumber); + auto executable_location = fml::paths::GetExecutableDirectoryPath().second; + auto app_path = fml::paths::JoinPaths({executable_location, "data", + "app.so"}); + FML_LOG(INFO) << "App path: " << app_path; + flutter::ShorebirdConfigArgs shorebird_args = + flutter::ShorebirdConfigArgs(code_cache_path, + code_cache_path, + app_path, + *shorebird_yaml_contents, + appVersion, + buildNumberStr); + auto patch_path = flutter::ConfigureShorebird(shorebird_args); + if (!patch_path.empty()) { + // If we have a patch installed, we replace the default AOT library path + // with the patch path here. + FML_LOG(INFO) << "Setting project patch path: " << patch_path; + project_->SetAotLibraryPath(patch_path); + } + } + // This loads AOT data from the project_'s aot_library_path_. if (embedder_api_.RunsAOTCompiledDartCode()) { aot_data_ = project_->LoadAotData(embedder_api_); @@ -476,26 +505,6 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { args.custom_task_runners = &custom_task_runners; - auto shorebird_yaml_path = - fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); - std::string* shorebird_yaml_contents = new std::string(); - if (filesystem::ReadFileToString(shorebird_yaml_path, - shorebird_yaml_contents)) { - args.shorebird_args.shorebird_yaml_contents = - shorebird_yaml_contents->c_str(); - } - args.shorebird_args.cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; - auto appVersion = GetReleaseVersion(); - args.shorebird_args.app_version = appVersion.c_str(); - auto buildNumber = GetBuildNumber(); - auto buildNumberStr = std::to_string(buildNumber); - args.shorebird_args.app_build_number = buildNumberStr.c_str(); - args.shorebird_args.app_path = - R"(C:\Users\bryan\Desktop\build\windows\x64\runner\Release\data\app.so)"; - - // _embedderAPI.Initialize seems to be called by the FlutterEngineRun (visible - // to us here as embedder_api_.Run). - if (!platform_view_plugin_) { platform_view_plugin_ = std::make_unique( messenger_wrapper_.get(), task_runner_.get()); @@ -539,28 +548,6 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { }; args.compositor = &compositor; - // FIXME - // The following was copied from the embedder. Ideally it would live there, - // but we need to populate args.aot_data with our patch, and we only know - // whether we have a patch (and where it is) after we've called - // ConfigureShorebird. - if (args.shorebird_args.shorebird_yaml_contents) { - fml::CommandLine command_line; - flutter::Settings settings = flutter::SettingsFromCommandLine(command_line); - - FML_LOG(INFO) << "[shorebird] Shorebird YAML contents provided."; - settings.application_library_path.push_back(args.shorebird_args.app_path); - flutter::ConfigureShorebird(args.shorebird_args, settings); - // settings.application_library_path has been modified by ConfigureShorebird - // to include the patch path, if one exists. - auto maybe_patch_path = settings.application_library_path.back(); - FML_LOG(INFO) << "[shorebird] Maybe patch path: " << maybe_patch_path; - aot_data_ = FlutterProjectBundle::LoadAotDataStatic(maybe_patch_path, - embedder_api_); - } else { - FML_LOG(INFO) << "[shorebird] No shorebird YAML contents provided."; - } - if (aot_data_) { args.aot_data = aot_data_.get(); } From 530a0026b0d83ddf54bc390320e99a07e77f293d Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:02:34 -0500 Subject: [PATCH 15/50] Formatting --- shell/common/shorebird/shorebird.cc | 8 ++++---- shell/common/shorebird/shorebird.h | 24 +++++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 076fab7927568..eb7814f6e6179 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -80,14 +80,14 @@ FileCallbacks ShorebirdFileCallbacks() { } std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { - FML_LOG(INFO) << "In ConfigureShorebird"; + FML_LOG(INFO) << "In ConfigureShorebird"; + // FIXME: This was commented out because the windows flutter engine does not + // populate the settings snapshots. Ideally we would call + // ConfigureShorebird from the embedder and this would be uncommented. // If you are crashing here, you probably are running Shorebird in a Debug // config, where the AOT snapshot won't be linked into the process, and thus // lookups will fail. Change your Scheme to Release to fix: // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode - // FIXME: This was commented out because the windows flutter engine does not - // populate the settings snapshots. Ideally we would call - // ConfigureShorebird from the embedder and this would be uncommented. // FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) // << "XCode Scheme must be set to Release to use Shorebird"; diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index 69878a6aca9b3..bc2407ad830bc 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -6,23 +6,25 @@ namespace flutter { -struct ShorebirdConfigArgs { - std::string code_cache_path; +struct ShorebirdConfigArgs { std::string code_cache_path; std::string app_storage_path; std::string release_app_library_path; const std::string& shorebird_yaml; const std::string& version; const std::string& version_code; - // constructor - ShorebirdConfigArgs( - std::string code_cache_path, - std::string app_storage_path, - std::string release_app_library_path, - const std::string& shorebird_yaml, - const std::string& version, - const std::string& version_code) : - code_cache_path(code_cache_path), app_storage_path(app_storage_path), release_app_library_path(release_app_library_path), shorebird_yaml(shorebird_yaml), version(version), version_code(version_code) {} + ShorebirdConfigArgs(std::string code_cache_path, + std::string app_storage_path, + std::string release_app_library_path, + const std::string& shorebird_yaml, + const std::string& version, + const std::string& version_code) + : code_cache_path(code_cache_path), + app_storage_path(app_storage_path), + release_app_library_path(release_app_library_path), + shorebird_yaml(shorebird_yaml), + version(version), + version_code(version_code) {} }; std::string ConfigureShorebird(const ShorebirdConfigArgs& args); From 104a1d52706ebd813c09a875e77347c9d1ab7851 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:06:08 -0500 Subject: [PATCH 16/50] Formatting --- shell/common/shorebird/shorebird.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index bc2407ad830bc..e7dfd3a0bacd9 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -13,9 +13,9 @@ struct ShorebirdConfigArgs { std::string code_cache_path; const std::string& version; const std::string& version_code; - ShorebirdConfigArgs(std::string code_cache_path, + ShorebirdConfigArgs(std::string code_cache_path, std::string app_storage_path, - std::string release_app_library_path, + std::string release_app_library_path, const std::string& shorebird_yaml, const std::string& version, const std::string& version_code) From 0b3a19b9d29fb931fcb57b2d4e1e3dd579efe201 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:09:03 -0500 Subject: [PATCH 17/50] Formatting --- shell/common/shorebird/shorebird.h | 5 +++-- shell/platform/windows/flutter_windows_engine.cc | 14 +++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index e7dfd3a0bacd9..61f73f6f9a7c4 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -6,7 +6,8 @@ namespace flutter { -struct ShorebirdConfigArgs { std::string code_cache_path; +struct ShorebirdConfigArgs { + std::string code_cache_path; std::string app_storage_path; std::string release_app_library_path; const std::string& shorebird_yaml; @@ -17,7 +18,7 @@ struct ShorebirdConfigArgs { std::string code_cache_path; std::string app_storage_path, std::string release_app_library_path, const std::string& shorebird_yaml, - const std::string& version, + const std::string& version, const std::string& version_code) : code_cache_path(code_cache_path), app_storage_path(app_storage_path), diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 06aebba7d6ddf..b2152e1a3cc61 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -341,16 +341,12 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto buildNumber = GetBuildNumber(); auto buildNumberStr = std::to_string(buildNumber); auto executable_location = fml::paths::GetExecutableDirectoryPath().second; - auto app_path = fml::paths::JoinPaths({executable_location, "data", - "app.so"}); + auto app_path = + fml::paths::JoinPaths({executable_location, "data", "app.so"}); FML_LOG(INFO) << "App path: " << app_path; - flutter::ShorebirdConfigArgs shorebird_args = - flutter::ShorebirdConfigArgs(code_cache_path, - code_cache_path, - app_path, - *shorebird_yaml_contents, - appVersion, - buildNumberStr); + flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( + code_cache_path, code_cache_path, app_path, *shorebird_yaml_contents, + appVersion, buildNumberStr); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From d49b2aefe512a09185e8c63c232cf1fa3139e633 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:14:36 -0500 Subject: [PATCH 18/50] Revert unneeded changes --- shell/platform/windows/BUILD.gn | 1 + .../windows/flutter_project_bundle.cc | 20 ++++++------------- .../platform/windows/flutter_project_bundle.h | 4 ---- .../windows/flutter_windows_engine.cc | 1 - 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/shell/platform/windows/BUILD.gn b/shell/platform/windows/BUILD.gn index c3439c90ea827..7389e5352f645 100644 --- a/shell/platform/windows/BUILD.gn +++ b/shell/platform/windows/BUILD.gn @@ -156,6 +156,7 @@ source_set("flutter_windows_source") { ":flutter_windows_headers", "//flutter/fml:fml", "//flutter/impeller/renderer/backend/gles", + "//flutter/shell/common/shorebird:shorebird", "//flutter/shell/platform/common:common_cpp", "//flutter/shell/platform/common:common_cpp_input", "//flutter/shell/platform/common:common_cpp_switches", diff --git a/shell/platform/windows/flutter_project_bundle.cc b/shell/platform/windows/flutter_project_bundle.cc index 2c77f2ea00b39..aab3239ce8291 100644 --- a/shell/platform/windows/flutter_project_bundle.cc +++ b/shell/platform/windows/flutter_project_bundle.cc @@ -55,21 +55,19 @@ bool FlutterProjectBundle::HasValidPaths() { // Attempts to load AOT data from the given path, which must be absolute and // non-empty. Logs and returns nullptr on failure. -UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( - std::filesystem::path aot_library_path, +UniqueAotDataPtr FlutterProjectBundle::LoadAotData( const FlutterEngineProcTable& engine_procs) { - if (aot_library_path.empty()) { + if (aot_library_path_.empty()) { FML_LOG(ERROR) << "Attempted to load AOT data, but no aot_library_path was provided."; return UniqueAotDataPtr(nullptr, nullptr); } - if (!std::filesystem::exists(aot_library_path)) { - FML_LOG(ERROR) << "Can't load AOT data from " << aot_library_path.u8string() - << " no such file."; + if (!std::filesystem::exists(aot_library_path_)) { + FML_LOG(ERROR) << "Can't load AOT data from " + << aot_library_path_.u8string() << "; no such file."; return UniqueAotDataPtr(nullptr, nullptr); } - FML_LOG(INFO) << "Loading aot_data from " << aot_library_path.u8string(); - std::string path_string = aot_library_path.u8string(); + std::string path_string = aot_library_path_.u8string(); FlutterEngineAOTDataSource source = {}; source.type = kFlutterEngineAOTDataSourceTypeElfPath; source.elf_path = path_string.c_str(); @@ -82,12 +80,6 @@ UniqueAotDataPtr FlutterProjectBundle::LoadAotDataStatic( return UniqueAotDataPtr(data, engine_procs.CollectAOTData); } -UniqueAotDataPtr FlutterProjectBundle::LoadAotData( - const FlutterEngineProcTable& engine_procs) { - return FlutterProjectBundle::LoadAotDataStatic(aot_library_path_, - engine_procs); -} - FlutterProjectBundle::~FlutterProjectBundle() {} void FlutterProjectBundle::SetSwitches( diff --git a/shell/platform/windows/flutter_project_bundle.h b/shell/platform/windows/flutter_project_bundle.h index 65da97bf45c7f..8e9126dbacedd 100644 --- a/shell/platform/windows/flutter_project_bundle.h +++ b/shell/platform/windows/flutter_project_bundle.h @@ -54,10 +54,6 @@ class FlutterProjectBundle { // Logs and returns nullptr on failure. UniqueAotDataPtr LoadAotData(const FlutterEngineProcTable& engine_procs); - static UniqueAotDataPtr LoadAotDataStatic( - std::filesystem::path aot_library_path, - const FlutterEngineProcTable& engine_procs); - // Returns the Dart entrypoint. const std::string& dart_entrypoint() const { return dart_entrypoint_; } diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index b2152e1a3cc61..6b68ce6286aa9 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -15,7 +15,6 @@ #include "flutter/fml/platform/win/wstring_conversion.h" #include "flutter/fml/synchronization/waitable_event.h" #include "flutter/shell/common/shorebird/shorebird.h" -#include "flutter/shell/common/switches.h" #include "flutter/shell/platform/common/client_wrapper/binary_messenger_impl.h" #include "flutter/shell/platform/common/client_wrapper/include/flutter/standard_message_codec.h" #include "flutter/shell/platform/common/path_utils.h" From 68d7a29596aee99bc9ff907d47d037d88de34d33 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:16:00 -0500 Subject: [PATCH 19/50] Revert changes --- shell/common/shorebird/shorebird.cc | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index eb7814f6e6179..c65640ea876fd 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -205,16 +205,12 @@ void ConfigureShorebird(std::string code_cache_path, const std::string& shorebird_yaml, const std::string& version, const std::string& version_code) { - FML_LOG(INFO) << "In ConfigureShorebird"; // If you are crashing here, you probably are running Shorebird in a Debug // config, where the AOT snapshot won't be linked into the process, and thus // lookups will fail. Change your Scheme to Release to fix: // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode - // FIXME: This was commented out because the windows flutter engine does not - // populate the settings snapshots. Ideally we would call - // ConfigureShorebird from the embedder and this would be uncommented. - // FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) - // << "XCode Scheme must be set to Release to use Shorebird"; + FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) + << "XCode Scheme must be set to Release to use Shorebird"; auto shorebird_updater_dir_name = "shorebird_updater"; @@ -230,7 +226,6 @@ void ConfigureShorebird(std::string code_cache_path, bool init_result; // Using a block to make AppParameters lifetime explicit. { - FML_LOG(INFO) << "Constructing app parameters"; AppParameters app_parameters; // Combine version and version_code into a single string. // We could also pass these separately through to the updater if needed. @@ -242,7 +237,6 @@ void ConfigureShorebird(std::string code_cache_path, // https://stackoverflow.com/questions/26032039/convert-vectorstring-into-char-c std::vector c_paths{}; for (const auto& string : settings.application_library_path) { - FML_LOG(INFO) << "Pushing " << string << " to c_paths"; c_paths.push_back(string.c_str()); } // Do not modify application_library_path or c_strings will invalidate. @@ -250,11 +244,9 @@ void ConfigureShorebird(std::string code_cache_path, app_parameters.original_libapp_paths = c_paths.data(); app_parameters.original_libapp_paths_size = c_paths.size(); - FML_LOG(INFO) << "Calling shorebird_init"; // shorebird_init copies from app_parameters and shorebirdYaml. init_result = shorebird_init(&app_parameters, ShorebirdFileCallbacks(), shorebird_yaml.c_str()); - FML_LOG(INFO) << "init_result: " << init_result; } // We've decided not to support synchronous updates on launch for now. @@ -268,10 +260,8 @@ void ConfigureShorebird(std::string code_cache_path, SetBaseSnapshot(settings); #endif - FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); if (c_active_path != NULL) { - FML_LOG(INFO) << "Found active patch"; std::string active_path = c_active_path; shorebird_free_string(c_active_path); FML_LOG(INFO) << "Shorebird updater: active path: " << active_path; @@ -307,9 +297,7 @@ void ConfigureShorebird(std::string code_cache_path, // Once start_update_thread is called, the next_boot_patch* functions may // change their return values if the shorebird_report_launch_failed // function is called. - FML_LOG(INFO) << "Reporting launch start"; shorebird_report_launch_start(); - FML_LOG(INFO) << "Reported launch start"; if (shorebird_should_auto_update()) { FML_LOG(INFO) << "Starting Shorebird update"; From c12edfeda6f1c884b8673a214ee06a2bef630621 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 17:36:02 -0500 Subject: [PATCH 20/50] Bump updater rev --- DEPS | 1966 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 973 insertions(+), 993 deletions(-) diff --git a/DEPS b/DEPS index 878bc4bfcf8ae..1caf02818e793 100644 --- a/DEPS +++ b/DEPS @@ -8,258 +8,233 @@ # to list the dependency's destination directory. vars = { - 'chromium_git': 'https://chromium.googlesource.com', - 'swiftshader_git': 'https://swiftshader.googlesource.com', - 'dart_git': 'https://dart.googlesource.com', - 'flutter_git': 'https://flutter.googlesource.com', - 'skia_git': 'https://skia.googlesource.com', - 'llvm_git': 'https://llvm.googlesource.com', - 'skia_revision': '6062afaa505bf7e6c727a20cafe4c7bee0f02df8', - "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", - "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", - "updater_git": "https://github.com/shorebirdtech/updater.git", - "updater_rev": "1e4efce65f28d54c7a806ea05defd2ca3eb94595", - - # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY - # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. - 'canvaskit_cipd_instance': '61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C', - - # Do not download the Emscripten SDK by default. - # This prevents us from downloading the Emscripten toolchain for builds - # which do not build for the web. This toolchain is needed to build CanvasKit - # for the web engine. - 'download_emsdk': False, - - # For experimental features some dependencies may only be avaialable in the master/main - # channels. This variable is being set when CI is checking out the repository. - 'release_candidate': False, - - # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision - # should be kept up to date with the revisions pulled by Dart. - # - # The list of revisions for these tools comes from Fuchsia, here: - # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain - # If there are problems with the toolchain, contact fuchsia-toolchain@. - # - # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) - # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that - # updates to Clang Tidy will not turn the tree red. - # - # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit - 'clang_version': 'git_revision:725656bdd885483c39f482a01ea25d67acf39c46', - - 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', - - 'gcloud_version': 'version:2@444.0.0.chromium.3', - - 'esbuild_version': '0.19.5', - - # When updating the Dart revision, ensure that all entries that are - # dependencies of Dart are also updated to match the entries in the - # Dart SDK's DEPS file for that revision of Dart. The DEPS file for - # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS - # You can use //tools/dart/create_updated_flutter_deps.py to produce - # updated revision list of existing dependencies. - 'dart_revision': 'ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04', - - # WARNING: DO NOT EDIT MANUALLY - # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py - 'dart_binaryen_rev': '459bc0797f67cb2a8fd4598bb7143b34036608d9', - 'dart_boringssl_gen_rev': 'fef055e8d2749b82c79c8f043be1cbe5e8e4b40c', - 'dart_boringssl_rev': '2db0eb3f96a5756298dcd7f9319e56a98585bd10', - 'dart_browser_launcher_rev': 'e5fc5d488eb5038bfec2a6690c72ab8dd353e101', - 'dart_clock_rev': '7956d60042f4ea979c4554d43eeb57d087627869', - 'dart_collection_rev': '24b75d85df6a26aac7be13b56ff1ce4360c04a64', - 'dart_devtools_rev': 'dcef4f6efe986f110f55dbbe7f3731802e86690a', - 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', - 'dart_perfetto_rev': '13ce0c9e13b0940d2476cd0cff2301708a9a2e2b', - 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', - 'dart_protobuf_rev': 'ccf104dbc36929c0f8708285d5f3a8fae206343e', - 'dart_pub_rev': '1efd3f5e274e153637d99698b0ee454f6f2550ab', - 'dart_tools_rev': 'd4995d47b99d5e9564abfed2218f4a23df75983b', - 'dart_watcher_rev': '3b850778ad0b62db3aa2cfe48832870c2461db30', - 'dart_web_rev': '8478cd27d574249eca3d41f9135458dfda2762c8', - 'dart_webdev_rev': '5f30c560dc4e3df341356c43ec1a766ee6b74a7c', - 'dart_webkit_inspection_protocol_rev': 'b459c427b74bf5e0919a083a97a167fb74d8bff1', - 'dart_yaml_edit_rev': '5c54d455f272bbb83c948ac420c677371e69ae77', - - 'ocmock_rev': 'c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8', # v3.7.1 - - # Download a prebuilt Dart SDK by default - 'download_dart_sdk': True, - - # Download a prebuilt esbuild by default - 'download_esbuild': True, - - # Checkout Android dependencies only on platforms where we build for Android targets. - 'download_android_deps': 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', - - # Checkout Java dependencies only on platforms that do not have java installed on path. - 'download_jdk': True, - - # Checkout Windows dependencies only if we are building on Windows. - 'download_windows_deps' : 'host_os == "win"', - - # Checkout Linux dependencies only when building on Linux. - 'download_linux_deps': 'host_os == "linux"', - - # The minimum macOS SDK version. This must match the setting in - # //flutter/tools/gn. - 'mac_sdk_min': '10.14', - - # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which - # controls the behavior of all fuchsia related flags. I.e. any fuchsia related - # logic or condition may not work if this flag is False. - # TODO(zijiehe): Make this condition more strict to only download fuchsia - # dependencies when necessary: b/40935282 - 'download_fuchsia_deps': 'host_os == "linux"', - # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable - # is currently only used for the Fuchsia LSC process and is not intended for - # local development. - 'download_fuchsia_sdk': False, - 'fuchsia_sdk_path': '', - # Whether to download and run the Fuchsia emulator locally to test Fuchsia - # builds. - 'run_fuchsia_emu': False, - - # An LLVM backend needs LLVM binaries and headers. To avoid build time - # increases we can use prebuilts. We don't want to download this on every - # CQ/CI bot nor do we want the average Dart developer to incur that cost. - # So by default we will not download prebuilts. This variable is needed in - # the flutter engine to ensure that Dart gn has access to it as well. - "checkout_llvm": False, - - # Setup Git hooks by default. - 'setup_githooks': True, - - # When this is true, the Flutter Engine's configuration files and scripts for - # RBE will be downloaded from CIPD. This option is only usable by Googlers. - 'use_rbe': False, - - # This is not downloaded be default because it increases the - # `gclient sync` time by between 1 and 3 minutes. This option is enabled - # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to - # only be useful locally when reproducing issues found by the bot. - 'download_impeller_cmake_example': False, - - # Upstream URLs for third party dependencies, used in - # determining common ancestor commit for vulnerability scanning - # prefixed with 'upstream_' in order to be identified by parsing tool. - # The vulnerability database being used in this scan can be browsed - # using this UI https://osv.dev/list - # If a new dependency needs to be added, the upstream (non-mirrored) - # git URL for that dependency should be added to this list - # with the key-value pair being: - # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' - # example: - "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", - "upstream_angle": "https://github.com/google/angle.git", - "upstream_archive": "https://github.com/brendan-duncan/archive.git", - "upstream_args": "https://github.com/dart-lang/args.git", - "upstream_async": "https://github.com/dart-lang/async.git", - "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", - "upstream_benchmark": "https://github.com/google/benchmark.git", - "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", - "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", - "upstream_boringssl": "https://github.com/openssl/openssl.git", - "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", - "upstream_buildroot": "https://github.com/flutter/buildroot.git", - "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", - "upstream_clock": "https://github.com/dart-lang/clock.git", - "upstream_collection": "https://github.com/dart-lang/collection.git", - "upstream_convert": "https://github.com/dart-lang/convert.git", - "upstream_crypto": "https://github.com/dart-lang/crypto.git", - "upstream_csslib": "https://github.com/dart-lang/csslib.git", - "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", - "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", - "upstream_equatable": "https://github.com/felangel/equatable.git", - "upstream_ffi": "https://github.com/dart-lang/ffi.git", - "upstream_file": "https://github.com/google/file.dart.git", - "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", - "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", - "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", - "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", - "upstream_glfw": "https://github.com/glfw/glfw.git", - "upstream_glob": "https://github.com/dart-lang/glob.git", - "upstream_googleapis": "https://github.com/google/googleapis.dart.git", - "upstream_googletest": "https://github.com/google/googletest.git", - "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", - "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", - "upstream_html": "https://github.com/dart-lang/html.git", - "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", - "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", - "upstream_http": "https://github.com/dart-lang/http.git", - "upstream_icu": "https://github.com/unicode-org/icu.git", - "upstream_intl": "https://github.com/dart-lang/intl.git", - "upstream_imgui": "https://github.com/ocornut/imgui.git", - "upstream_inja": "https://github.com/pantor/inja.git", - "upstream_json": "https://github.com/nlohmann/json.git", - "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", - "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", - "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", - "upstream_libexpat": "https://github.com/libexpat/libexpat.git", - "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", - "upstream_libpng": "https://github.com/glennrp/libpng.git", - "upstream_libtess2": "https://github.com/memononen/libtess2.git", - "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", - "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", - "upstream_logging": "https://github.com/dart-lang/logging.git", - "upstream_markdown": "https://github.com/dart-lang/markdown.git", - "upstream_matcher": "https://github.com/dart-lang/matcher.git", - "upstream_mockito": "https://github.com/dart-lang/mockito.git", - "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", - "upstream_package_config": "https://github.com/dart-lang/package_config.git", - "upstream_packages": "https://github.com/flutter/packages.git", - "upstream_path": "https://github.com/dart-lang/path.git", - "upstream_platform": "https://github.com/google/platform.dart.git", - "upstream_pool": "https://github.com/dart-lang/pool.git", - "upstream_process_runner": "https://github.com/google/process_runner.git", - "upstream_process": "https://github.com/google/process.dart.git", - "upstream_protobuf": "https://github.com/google/protobuf.dart.git", - "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", - "upstream_pub": "https://github.com/dart-lang/pub.git", - "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", - "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", - "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", - "upstream_sdk": "https://github.com/dart-lang/sdk.git", - "upstream_shaderc": "https://github.com/google/shaderc.git", - "upstream_shelf": "https://github.com/dart-lang/shelf.git", - "upstream_skia": "https://skia.googlesource.com/skia.git", - "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", - "upstream_source_span": "https://github.com/dart-lang/source_span.git", - "upstream_sqlite": "https://github.com/sqlite/sqlite.git", - "upstream_sse": "https://github.com/dart-lang/sse.git", - "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", - "upstream_stb": "https://github.com/nothings/stb.git", - "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", - "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", - "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", - "upstream_tar": "https://github.com/simolus3/tar.git", - "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", - "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", - "upstream_test": "https://github.com/dart-lang/test.git", - "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", - "upstream_usage": "https://github.com/dart-lang/usage.git", - "upstream_vector_math": "https://github.com/google/vector_math.dart.git", - "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", - "upstream_watcher": "https://github.com/dart-lang/watcher.git", - "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", - "upstream_webdev": "https://github.com/dart-lang/webdev.git", - "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", - "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", - "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", - "upstream_yaml": "https://github.com/dart-lang/yaml.git", - "upstream_yapf": "https://github.com/google/yapf.git", - "upstream_zlib": "https://github.com/madler/zlib.git", - - # The version / instance id of the cipd:chromium/fuchsia/test-scripts which - # will be used altogether with fuchsia-sdk to setup the build / test - # environment. - 'fuchsia_test_scripts_version': '_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC', - - # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be - # used altogether with fuchsia-sdk to generate gn based build rules. - 'fuchsia_gn_sdk_version': 'tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC', + "chromium_git": "https://chromium.googlesource.com", + "swiftshader_git": "https://swiftshader.googlesource.com", + "dart_git": "https://dart.googlesource.com", + "flutter_git": "https://flutter.googlesource.com", + "skia_git": "https://skia.googlesource.com", + "llvm_git": "https://llvm.googlesource.com", + "skia_revision": "6062afaa505bf7e6c727a20cafe4c7bee0f02df8", + "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", + "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", + "updater_git": "https://github.com/shorebirdtech/updater.git", + "updater_rev": "71b5ed65fab03fcf241edf0c74d027de9998da51", + # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY + # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. + "canvaskit_cipd_instance": "61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C", + # Do not download the Emscripten SDK by default. + # This prevents us from downloading the Emscripten toolchain for builds + # which do not build for the web. This toolchain is needed to build CanvasKit + # for the web engine. + "download_emsdk": False, + # For experimental features some dependencies may only be avaialable in the master/main + # channels. This variable is being set when CI is checking out the repository. + "release_candidate": False, + # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision + # should be kept up to date with the revisions pulled by Dart. + # + # The list of revisions for these tools comes from Fuchsia, here: + # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain + # If there are problems with the toolchain, contact fuchsia-toolchain@. + # + # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) + # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that + # updates to Clang Tidy will not turn the tree red. + # + # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit + "clang_version": "git_revision:725656bdd885483c39f482a01ea25d67acf39c46", + "reclient_version": "git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee", + "gcloud_version": "version:2@444.0.0.chromium.3", + "esbuild_version": "0.19.5", + # When updating the Dart revision, ensure that all entries that are + # dependencies of Dart are also updated to match the entries in the + # Dart SDK's DEPS file for that revision of Dart. The DEPS file for + # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS + # You can use //tools/dart/create_updated_flutter_deps.py to produce + # updated revision list of existing dependencies. + "dart_revision": "ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04", + # WARNING: DO NOT EDIT MANUALLY + # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py + "dart_binaryen_rev": "459bc0797f67cb2a8fd4598bb7143b34036608d9", + "dart_boringssl_gen_rev": "fef055e8d2749b82c79c8f043be1cbe5e8e4b40c", + "dart_boringssl_rev": "2db0eb3f96a5756298dcd7f9319e56a98585bd10", + "dart_browser_launcher_rev": "e5fc5d488eb5038bfec2a6690c72ab8dd353e101", + "dart_clock_rev": "7956d60042f4ea979c4554d43eeb57d087627869", + "dart_collection_rev": "24b75d85df6a26aac7be13b56ff1ce4360c04a64", + "dart_devtools_rev": "dcef4f6efe986f110f55dbbe7f3731802e86690a", + "dart_libprotobuf_rev": "24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb", + "dart_perfetto_rev": "13ce0c9e13b0940d2476cd0cff2301708a9a2e2b", + "dart_protobuf_gn_rev": "ca669f79945418f6229e4fef89b666b2a88cbb10", + "dart_protobuf_rev": "ccf104dbc36929c0f8708285d5f3a8fae206343e", + "dart_pub_rev": "1efd3f5e274e153637d99698b0ee454f6f2550ab", + "dart_tools_rev": "d4995d47b99d5e9564abfed2218f4a23df75983b", + "dart_watcher_rev": "3b850778ad0b62db3aa2cfe48832870c2461db30", + "dart_web_rev": "8478cd27d574249eca3d41f9135458dfda2762c8", + "dart_webdev_rev": "5f30c560dc4e3df341356c43ec1a766ee6b74a7c", + "dart_webkit_inspection_protocol_rev": "b459c427b74bf5e0919a083a97a167fb74d8bff1", + "dart_yaml_edit_rev": "5c54d455f272bbb83c948ac420c677371e69ae77", + "ocmock_rev": "c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8", # v3.7.1 + # Download a prebuilt Dart SDK by default + "download_dart_sdk": True, + # Download a prebuilt esbuild by default + "download_esbuild": True, + # Checkout Android dependencies only on platforms where we build for Android targets. + "download_android_deps": 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', + # Checkout Java dependencies only on platforms that do not have java installed on path. + "download_jdk": True, + # Checkout Windows dependencies only if we are building on Windows. + "download_windows_deps": 'host_os == "win"', + # Checkout Linux dependencies only when building on Linux. + "download_linux_deps": 'host_os == "linux"', + # The minimum macOS SDK version. This must match the setting in + # //flutter/tools/gn. + "mac_sdk_min": "10.14", + # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which + # controls the behavior of all fuchsia related flags. I.e. any fuchsia related + # logic or condition may not work if this flag is False. + # TODO(zijiehe): Make this condition more strict to only download fuchsia + # dependencies when necessary: b/40935282 + "download_fuchsia_deps": 'host_os == "linux"', + # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable + # is currently only used for the Fuchsia LSC process and is not intended for + # local development. + "download_fuchsia_sdk": False, + "fuchsia_sdk_path": "", + # Whether to download and run the Fuchsia emulator locally to test Fuchsia + # builds. + "run_fuchsia_emu": False, + # An LLVM backend needs LLVM binaries and headers. To avoid build time + # increases we can use prebuilts. We don't want to download this on every + # CQ/CI bot nor do we want the average Dart developer to incur that cost. + # So by default we will not download prebuilts. This variable is needed in + # the flutter engine to ensure that Dart gn has access to it as well. + "checkout_llvm": False, + # Setup Git hooks by default. + "setup_githooks": True, + # When this is true, the Flutter Engine's configuration files and scripts for + # RBE will be downloaded from CIPD. This option is only usable by Googlers. + "use_rbe": False, + # This is not downloaded be default because it increases the + # `gclient sync` time by between 1 and 3 minutes. This option is enabled + # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to + # only be useful locally when reproducing issues found by the bot. + "download_impeller_cmake_example": False, + # Upstream URLs for third party dependencies, used in + # determining common ancestor commit for vulnerability scanning + # prefixed with 'upstream_' in order to be identified by parsing tool. + # The vulnerability database being used in this scan can be browsed + # using this UI https://osv.dev/list + # If a new dependency needs to be added, the upstream (non-mirrored) + # git URL for that dependency should be added to this list + # with the key-value pair being: + # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' + # example: + "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", + "upstream_angle": "https://github.com/google/angle.git", + "upstream_archive": "https://github.com/brendan-duncan/archive.git", + "upstream_args": "https://github.com/dart-lang/args.git", + "upstream_async": "https://github.com/dart-lang/async.git", + "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", + "upstream_benchmark": "https://github.com/google/benchmark.git", + "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", + "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", + "upstream_boringssl": "https://github.com/openssl/openssl.git", + "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", + "upstream_buildroot": "https://github.com/flutter/buildroot.git", + "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", + "upstream_clock": "https://github.com/dart-lang/clock.git", + "upstream_collection": "https://github.com/dart-lang/collection.git", + "upstream_convert": "https://github.com/dart-lang/convert.git", + "upstream_crypto": "https://github.com/dart-lang/crypto.git", + "upstream_csslib": "https://github.com/dart-lang/csslib.git", + "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", + "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", + "upstream_equatable": "https://github.com/felangel/equatable.git", + "upstream_ffi": "https://github.com/dart-lang/ffi.git", + "upstream_file": "https://github.com/google/file.dart.git", + "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", + "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", + "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", + "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", + "upstream_glfw": "https://github.com/glfw/glfw.git", + "upstream_glob": "https://github.com/dart-lang/glob.git", + "upstream_googleapis": "https://github.com/google/googleapis.dart.git", + "upstream_googletest": "https://github.com/google/googletest.git", + "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", + "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", + "upstream_html": "https://github.com/dart-lang/html.git", + "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", + "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", + "upstream_http": "https://github.com/dart-lang/http.git", + "upstream_icu": "https://github.com/unicode-org/icu.git", + "upstream_intl": "https://github.com/dart-lang/intl.git", + "upstream_imgui": "https://github.com/ocornut/imgui.git", + "upstream_inja": "https://github.com/pantor/inja.git", + "upstream_json": "https://github.com/nlohmann/json.git", + "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", + "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", + "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", + "upstream_libexpat": "https://github.com/libexpat/libexpat.git", + "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", + "upstream_libpng": "https://github.com/glennrp/libpng.git", + "upstream_libtess2": "https://github.com/memononen/libtess2.git", + "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", + "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", + "upstream_logging": "https://github.com/dart-lang/logging.git", + "upstream_markdown": "https://github.com/dart-lang/markdown.git", + "upstream_matcher": "https://github.com/dart-lang/matcher.git", + "upstream_mockito": "https://github.com/dart-lang/mockito.git", + "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", + "upstream_package_config": "https://github.com/dart-lang/package_config.git", + "upstream_packages": "https://github.com/flutter/packages.git", + "upstream_path": "https://github.com/dart-lang/path.git", + "upstream_platform": "https://github.com/google/platform.dart.git", + "upstream_pool": "https://github.com/dart-lang/pool.git", + "upstream_process_runner": "https://github.com/google/process_runner.git", + "upstream_process": "https://github.com/google/process.dart.git", + "upstream_protobuf": "https://github.com/google/protobuf.dart.git", + "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", + "upstream_pub": "https://github.com/dart-lang/pub.git", + "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", + "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", + "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", + "upstream_sdk": "https://github.com/dart-lang/sdk.git", + "upstream_shaderc": "https://github.com/google/shaderc.git", + "upstream_shelf": "https://github.com/dart-lang/shelf.git", + "upstream_skia": "https://skia.googlesource.com/skia.git", + "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", + "upstream_source_span": "https://github.com/dart-lang/source_span.git", + "upstream_sqlite": "https://github.com/sqlite/sqlite.git", + "upstream_sse": "https://github.com/dart-lang/sse.git", + "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", + "upstream_stb": "https://github.com/nothings/stb.git", + "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", + "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", + "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", + "upstream_tar": "https://github.com/simolus3/tar.git", + "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", + "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", + "upstream_test": "https://github.com/dart-lang/test.git", + "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", + "upstream_usage": "https://github.com/dart-lang/usage.git", + "upstream_vector_math": "https://github.com/google/vector_math.dart.git", + "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", + "upstream_watcher": "https://github.com/dart-lang/watcher.git", + "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", + "upstream_webdev": "https://github.com/dart-lang/webdev.git", + "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", + "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", + "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", + "upstream_yaml": "https://github.com/dart-lang/yaml.git", + "upstream_yapf": "https://github.com/google/yapf.git", + "upstream_zlib": "https://github.com/madler/zlib.git", + # The version / instance id of the cipd:chromium/fuchsia/test-scripts which + # will be used altogether with fuchsia-sdk to setup the build / test + # environment. + "fuchsia_test_scripts_version": "_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC", + # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be + # used altogether with fuchsia-sdk to generate gn based build rules. + "fuchsia_gn_sdk_version": "tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC", } gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" @@ -279,747 +254,752 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/shorebirdtech/buildroot.git' + '@' + '4c5c8abd2ab1ac7c2c029503c71450a87bf94307', - - 'src/flutter/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', - - 'src/flutter/third_party/rapidjson': - Var('flutter_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', - - 'src/flutter/third_party/harfbuzz': - Var('flutter_git') + '/third_party/harfbuzz' + '@' + 'ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2', - - 'src/flutter/third_party/libcxx': - Var('llvm_git') + '/llvm-project/libcxx' + '@' + '44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0', - - 'src/flutter/third_party/libcxxabi': - Var('llvm_git') + '/llvm-project/libcxxabi' + '@' + '2ce528fb5e0f92e57c97ec3ff53b75359d33af12', - - 'src/flutter/third_party/glfw': - Var('flutter_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', - - 'src/flutter/third_party/shaderc': - Var('chromium_git') + '/external/github.com/google/shaderc' + '@' + '37e25539ce199ecaf19fb7f7d27818716d36686d', - - 'src/flutter/third_party/vulkan-deps': - Var('chromium_git') + '/vulkan-deps' + '@' + '014f44e134a1de387791bffacc32ff9d8db71176', - - 'src/flutter/third_party/flatbuffers': - Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', - - 'src/flutter/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb', - - 'src/flutter/third_party/gtest-parallel': - Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', - - 'src/flutter/third_party/benchmark': - Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', - - 'src/flutter/third_party/googletest': - Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0', - - 'src/flutter/third_party/boringssl': - Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), - - 'src/flutter/third_party/yapf': - Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', - - 'src/flutter/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'), - - 'src/flutter/third_party/perfetto': - Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'), - - 'src/flutter/third_party/protobuf': - Var('flutter_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'), - - # TODO(67373): These are temporarily checked in, but this dep can be restored - # once the buildmoot is completed. - # 'src/flutter/build/secondary/third_party/protobuf': - # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), - - 'src/flutter/third_party/dart': - Var('dart_sdk_git') + '@' + Var('dart_sdk_revision'), - - # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. - - 'src/flutter/third_party/dart/third_party/binaryen/src': - Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9', - - 'src/flutter/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056'}]}, - - 'src/flutter/third_party/dart/third_party/pkg/args': - Var('dart_git') + '/args.git@e623652744c82533829f2e62b1aba1a6cf06e291', - - 'src/flutter/third_party/dart/third_party/pkg/async': - Var('dart_git') + '/async.git@c0d81f8699682d01d657a9bf827107d11904a247', - - 'src/flutter/third_party/dart/third_party/pkg/bazel_worker': - Var('dart_git') + '/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac', - - 'src/flutter/third_party/dart/third_party/pkg/boolean_selector': - Var('dart_git') + '/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68', - - 'src/flutter/third_party/dart/third_party/pkg/browser_launcher': - Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/cli_util': - Var('dart_git') + '/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38', - - 'src/flutter/third_party/dart/third_party/pkg/clock': - Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/collection': - Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/convert': - Var('dart_git') + '/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a', - - 'src/flutter/third_party/dart/third_party/pkg/crypto': - Var('dart_git') + '/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57', - - 'src/flutter/third_party/dart/third_party/pkg/csslib': - Var('dart_git') + '/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249', - - 'src/flutter/third_party/dart/third_party/pkg/dart_style': - Var('dart_git') + '/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e', - - 'src/flutter/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0', - - 'src/flutter/third_party/dart/third_party/pkg/file': - Var('dart_git') + '/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e', - - 'src/flutter/third_party/dart/third_party/pkg/fixnum': - Var('dart_git') + '/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0', - - 'src/flutter/third_party/dart/third_party/pkg/glob': - Var('dart_git') + '/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52', - - 'src/flutter/third_party/dart/third_party/pkg/html': - Var('dart_git') + '/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4', - - 'src/flutter/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525', - - 'src/flutter/third_party/dart/third_party/pkg/http_multi_server': - Var('dart_git') + '/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0', - - 'src/flutter/third_party/dart/third_party/pkg/http_parser': - Var('dart_git') + '/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939', - - 'src/flutter/third_party/dart/third_party/pkg/intl': - Var('dart_git') + '/intl.git@5d65e3808ce40e6282e40881492607df4e35669f', - - 'src/flutter/third_party/dart/third_party/pkg/json_rpc_2': - Var('dart_git') + '/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce', - - 'src/flutter/third_party/dart/third_party/pkg/leak_tracker': - Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c', - - 'src/flutter/third_party/dart/third_party/pkg/logging': - Var('dart_git') + '/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e', - - 'src/flutter/third_party/dart/third_party/pkg/markdown': - Var('dart_git') + '/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40', - - 'src/flutter/third_party/dart/third_party/pkg/matcher': - Var('dart_git') + '/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c', - - 'src/flutter/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab', - - 'src/flutter/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@659511886501bcce638c3966590df04984909ef0', - - 'src/flutter/third_party/dart/third_party/pkg/package_config': - Var('dart_git') + '/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6', - - 'src/flutter/third_party/dart/third_party/pkg/path': - Var('dart_git') + '/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805', - - 'src/flutter/third_party/dart/third_party/pkg/pool': - Var('dart_git') + '/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a', - - 'src/flutter/third_party/dart/third_party/pkg/protobuf': - Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/pub': - Var('dart_git') + '/pub.git' + '@' + Var('dart_pub_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/pub_semver': - Var('dart_git') + '/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02', - - 'src/flutter/third_party/dart/third_party/pkg/shelf': - Var('dart_git') + '/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36', - - 'src/flutter/third_party/dart/third_party/pkg/source_maps': - Var('dart_git') + '/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8', - - 'src/flutter/third_party/dart/third_party/pkg/source_span': - Var('dart_git') + '/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550', - - 'src/flutter/third_party/dart/third_party/pkg/sse': - Var('dart_git') + '/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79', - - 'src/flutter/third_party/dart/third_party/pkg/stack_trace': - Var('dart_git') + '/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525', - - 'src/flutter/third_party/dart/third_party/pkg/stream_channel': - Var('dart_git') + '/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825', - - 'src/flutter/third_party/dart/third_party/pkg/string_scanner': - Var('dart_git') + '/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01', - - 'src/flutter/third_party/dart/third_party/pkg/tar': - Var('dart_git') + '/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291', - - 'src/flutter/third_party/dart/third_party/pkg/term_glyph': - Var('dart_git') + '/term_glyph.git@19d8c08a4e81122639129c62049896021910c932', - - 'src/flutter/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b', - - 'src/flutter/third_party/dart/third_party/pkg/test_reflective_loader': - Var('dart_git') + '/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078', - - 'src/flutter/third_party/dart/third_party/pkg/tools': - Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/typed_data': - Var('dart_git') + '/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945', - - 'src/flutter/third_party/dart/third_party/pkg/watcher': - Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/web': - Var('dart_git') + '/web.git' + '@' + Var('dart_web_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/web_socket_channel': - Var('dart_git') + '/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6', - - 'src/flutter/third_party/dart/third_party/pkg/webdev': - Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol': - Var('dart_git') + '/external/github.com/google/webkit_inspection_protocol.dart.git' + '@' + Var('dart_webkit_inspection_protocol_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/yaml': - Var('dart_git') + '/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15', - - 'src/flutter/third_party/dart/third_party/pkg/yaml_edit': - Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), - - 'src/flutter/third_party/dart/tools/sdks/dart-sdk': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'git_revision:7e6469bd51d404916395a47b011d907d2c905121'}]}, - - # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. - - # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout - 'src/flutter/prebuilts/linux-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/linux-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_dart_sdk' - }, - 'src/flutter/prebuilts/linux-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/linux-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_dart_sdk' - }, - 'src/flutter/prebuilts/macos-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/mac-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_dart_sdk' - }, - 'src/flutter/prebuilts/macos-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/mac-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_dart_sdk' - }, - 'src/flutter/prebuilts/windows-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/windows-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_dart_sdk' - }, - 'src/flutter/prebuilts/windows-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/windows-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_dart_sdk' - }, - - # esbuild download - 'src/flutter/prebuilts/linux-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/linux-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_esbuild' - }, - 'src/flutter/prebuilts/macos-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/mac-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_esbuild' - }, - 'src/flutter/prebuilts/macos-arm64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/mac-arm64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_esbuild' - }, - 'src/flutter/prebuilts/windows-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/windows-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_esbuild' - }, - - 'src/flutter/third_party/expat': - Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + '654d2de0da85662fcc7644a7acd7c2dd2cfb21f0', - - 'src/flutter/third_party/freetype2': - Var('flutter_git') + '/third_party/freetype2' + '@' + 'bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a', - - 'src/flutter/third_party/skia': - Var('skia_git') + '/skia.git' + '@' + Var('skia_revision'), - - 'src/flutter/third_party/ocmock': - Var('flutter_git') + '/third_party/ocmock' + '@' + Var('ocmock_rev'), - - 'src/third_party/updater': - Var('updater_git') + '@' + Var('updater_rev'), - - 'src/flutter/third_party/libjpeg-turbo/src': - Var('flutter_git') + '/third_party/libjpeg-turbo' + '@' + '0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f', - - 'src/flutter/third_party/libpng': - Var('flutter_git') + '/third_party/libpng' + '@' + 'de36b892e921c684ef718fec24739ae9bb49c977', - - 'src/flutter/third_party/libwebp': - Var('chromium_git') + '/webm/libwebp.git' + '@' + 'ca332209cb5567c9b249c86788cb2dbf8847e760', # 1.3.2 - - 'src/flutter/third_party/wuffs': - Var('skia_git') + '/external/github.com/google/wuffs-mirror-release-c.git' + '@' + '600cd96cf47788ee3a74b40a6028b035c9fd6a61', - - 'src/flutter/third_party/zlib': - Var('chromium_git') + '/chromium/src/third_party/zlib.git' + '@' + '7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df', - - 'src/flutter/third_party/cpu_features/src': - Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', - - 'src/flutter/third_party/inja': - Var('flutter_git') + '/third_party/inja' + '@' + '88bd6112575a80d004e551c98cf956f88ff4d445', - - 'src/flutter/third_party/libtess2': - Var('flutter_git') + '/third_party/libtess2' + '@' + '725e5e08ec8751477565f1d603fd7eb9058c277c', - - 'src/flutter/third_party/sqlite': - Var('flutter_git') + '/third_party/sqlite' + '@' + '0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c', - - 'src/flutter/third_party/pyyaml': - Var('flutter_git') + '/third_party/pyyaml.git' + '@' + '03c67afd452cdff45b41bfe65e19a2fb5b80a0e8', - - 'src/flutter/third_party/swiftshader': - Var('swiftshader_git') + '/SwiftShader.git' + '@' + '2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f', - - 'src/flutter/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', - - 'src/flutter/third_party/vulkan_memory_allocator': - Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6', - - 'src/flutter/third_party/abseil-cpp': - Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + 'ff6504dc527b25fef0f3c531e7dba0ed6b69c162', - - # Dart packages - 'src/flutter/third_party/pkg/archive': - Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + 'f1d164f8f5d8aea0be620a9b1e8d300b75a29388', # 3.6.1 - - 'src/flutter/third_party/pkg/coverage': - Var('flutter_git') + '/third_party/coverage.git' + '@' + 'bb0ab721ee4ceef1abfa413d8d6fd46013b583b9', # 1.7.2 - - 'src/flutter/third_party/pkg/equatable': - Var('flutter_git') + '/third_party/equatable.git' + '@' + '2117551ff3054f8edb1a58f63ffe1832a8d25623', # 2.0.5 - - 'src/flutter/third_party/pkg/flutter_packages': - Var('flutter_git') + '/mirrors/packages' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various - - 'src/flutter/third_party/pkg/gcloud': - Var('flutter_git') + '/third_party/gcloud.git' + '@' + 'a5276b85c4714378e84b1fb478b8feeeb686ac26', # 0.8.6-dev - - 'src/flutter/third_party/pkg/googleapis': - Var('flutter_git') + '/third_party/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various - - 'src/flutter/third_party/pkg/io': - Var('flutter_git') + '/third_party/io.git' + '@' + '997a6243aad20af4238147d9ec00bf638b9169af', # 1.0.5-wip - - 'src/flutter/third_party/pkg/node_preamble': - Var('flutter_git') + '/third_party/node_preamble.dart.git' + '@' + '47245865175929ec452d8058e563c267b64c3d64', # 2.0.2 - - 'src/flutter/third_party/pkg/platform': - Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 - - 'src/flutter/third_party/pkg/process': - Var('dart_git') + '/process.dart' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 - - 'src/flutter/third_party/pkg/process_runner': - Var('flutter_git') + '/third_party/process_runner.git' + '@' + 'f24c69efdcaf109168f23d381fa281453d2bc9b1', # 4.1.2 - - 'src/flutter/third_party/pkg/vector_math': - Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 - - 'src/flutter/third_party/imgui': - Var('flutter_git') + '/third_party/imgui.git' + '@' + '3ea0fad204e994d669f79ed29dcaf61cd5cb571d', - - 'src/flutter/third_party/json': - Var('flutter_git') + '/third_party/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642', - - 'src/flutter/third_party/stb': - Var('flutter_git') + '/third_party/stb.git' + '@' + '5736b15f7ea0ffb08dd38af21067c314d6a3aae9', - - 'src/flutter/third_party/gradle': { - 'packages': [ - { - # See tools/gradle/README.md for update instructions. - # Version here means the CIPD tag. - 'version': 'version:8.9', - 'package': 'flutter/gradle' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd' - }, - - 'src/flutter/third_party/android_tools/trace_to_text': { - 'packages': [ - { - # 25.0 downloads for both mac-amd64 and mac-arm64 - # 26.1 is not found with either platform - # 27.1 is the latest release of perfetto - 'version': 'git_tag:v25.0', - 'package': 'perfetto/trace_to_text/${{platform}}' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd' - }, - - 'src/flutter/third_party/android_tools/google-java-format': { - 'packages': [ - { - 'package': 'flutter/android/google-java-format', - 'version': 'version:1.7-1' - } - ], - # We want to be able to format these as part of CI, and the CI step that - # checks formatting runs without downloading the rest of the Android build - # tooling. Therefore unlike all the other Android-related tools, we want to - # download this every time. - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/android_tools': { - 'packages': [ - { - 'package': 'flutter/android/sdk/all/${{platform}}', - 'version': 'version:35v1' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/android_embedding_dependencies': { - 'packages': [ - { - 'package': 'flutter/android/embedding_bundle', - 'version': 'last_updated:2024-09-10T16:32:16-0700' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/java/openjdk': { - 'packages': [ - { - 'package': 'flutter/java/openjdk/${{platform}}', - 'version': 'version:17' - } - ], - # Always download the JDK since java is required for running the formatter. - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/gn': { - 'packages': [ - { - 'package': 'gn/gn/${{platform}}', - 'version': 'git_revision:b79031308cc878488202beb99883ec1f2efd9a6d' - }, - ], - 'dep_type': 'cipd', - }, - 'src/flutter/third_party/ninja': { - 'packages': [ - { - 'package': 'infra/3pp/tools/ninja/${{platform}}', - 'version': 'version:2@1.11.1.chromium.4', - } - ], - 'dep_type': 'cipd', - }, - - 'src/flutter/prebuilts/emsdk': { - 'url': Var('skia_git') + '/external/github.com/emscripten-core/emsdk.git' + '@' + 'a896e3d066448b3530dbcaa48869fafefd738f57', - 'condition': 'download_emsdk', - }, - - # Clang on mac and linux are expected to typically be the same revision. - # They are separated out so that the autoroller can more easily manage them. - 'src/flutter/buildtools/mac-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/mac-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/mac-arm64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/linux-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/linux-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "linux" or host_os == "mac"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/linux-arm64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/linux-arm64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "linux" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/windows-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/windows-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'download_windows_deps', - 'dep_type': 'cipd', - }, - - # RBE binaries and configs. - 'src/flutter/buildtools/linux-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/windows-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and download_windows_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/build/rbe': { - 'packages': [ - { - 'package': 'flutter_internal/rbe/reclient_cfgs', - 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', - } - ], - 'condition': 'use_rbe', - 'dep_type': 'cipd', - }, - - # gcloud - 'src/flutter/buildtools/linux-x64/gcloud': { - 'packages': [ - { - 'package': 'infra/3pp/tools/gcloud/${{platform}}', - 'version': Var('gcloud_version'), - } - ], - 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/gcloud': { - 'packages': [ - { - 'package': 'infra/3pp/tools/gcloud/${{platform}}', - 'version': Var('gcloud_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag - # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag - 'src/fuchsia/sdk/linux': { - 'packages': [ - { - 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC' - } - ], - 'condition': 'download_fuchsia_deps and not download_fuchsia_sdk', - 'dep_type': 'cipd', - }, - - 'src/flutter/tools/fuchsia/test_scripts': { - 'packages': [ - { - 'package': 'chromium/fuchsia/test-scripts', - 'version': Var('fuchsia_test_scripts_version'), - } - ], - 'condition': 'download_fuchsia_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/tools/fuchsia/gn-sdk': { - 'packages': [ - { - 'package': 'chromium/fuchsia/gn-sdk', - 'version': Var('fuchsia_gn_sdk_version'), - } - ], - 'condition': 'download_fuchsia_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/impeller-cmake-example': { - 'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + '9f8298ec31dcbebbf019bd487888166abf2f55e6', - 'condition': 'download_impeller_cmake_example', - }, - - # cmake is only used by impeller-cmake-example. - 'src/flutter/buildtools/mac-x64/cmake': { - 'packages': [ - { - 'package': 'infra/3pp/tools/cmake/mac-amd64', - 'version': 'CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC', - } - ], - 'condition': 'download_impeller_cmake_example and host_os == "mac"', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/google_fonts_for_unit_tests': { - 'packages': [ - { - 'package': 'flutter/flutter_font_fallbacks', - 'version': 'c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea' - } - ], - 'dep_type': 'cipd', - } + "src": "https://github.com/shorebirdtech/buildroot.git" + + "@" + + "4c5c8abd2ab1ac7c2c029503c71450a87bf94307", + "src/flutter/third_party/depot_tools": Var("chromium_git") + + "/chromium/tools/depot_tools.git" + + "@" + + "580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7", + "src/flutter/third_party/rapidjson": Var("flutter_git") + + "/third_party/rapidjson" + + "@" + + "ef3564c5c8824989393b87df25355baf35ff544b", + "src/flutter/third_party/harfbuzz": Var("flutter_git") + + "/third_party/harfbuzz" + + "@" + + "ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2", + "src/flutter/third_party/libcxx": Var("llvm_git") + + "/llvm-project/libcxx" + + "@" + + "44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0", + "src/flutter/third_party/libcxxabi": Var("llvm_git") + + "/llvm-project/libcxxabi" + + "@" + + "2ce528fb5e0f92e57c97ec3ff53b75359d33af12", + "src/flutter/third_party/glfw": Var("flutter_git") + + "/third_party/glfw" + + "@" + + "dd8a678a66f1967372e5a5e3deac41ebf65ee127", + "src/flutter/third_party/shaderc": Var("chromium_git") + + "/external/github.com/google/shaderc" + + "@" + + "37e25539ce199ecaf19fb7f7d27818716d36686d", + "src/flutter/third_party/vulkan-deps": Var("chromium_git") + + "/vulkan-deps" + + "@" + + "014f44e134a1de387791bffacc32ff9d8db71176", + "src/flutter/third_party/flatbuffers": Var("chromium_git") + + "/external/github.com/google/flatbuffers" + + "@" + + "0a80646371179f8a7a5c1f42c31ee1d44dcf6709", + "src/flutter/third_party/icu": Var("chromium_git") + + "/chromium/deps/icu.git" + + "@" + + "9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb", + "src/flutter/third_party/gtest-parallel": Var("chromium_git") + + "/external/github.com/google/gtest-parallel" + + "@" + + "38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14", + "src/flutter/third_party/benchmark": Var("chromium_git") + + "/external/github.com/google/benchmark" + + "@" + + "431abd149fd76a072f821913c0340137cc755f36", + "src/flutter/third_party/googletest": Var("chromium_git") + + "/external/github.com/google/googletest" + + "@" + + "7f036c5563af7d0329f20e8bb42effb04629f0c0", + "src/flutter/third_party/boringssl": Var("dart_git") + + "/boringssl_gen.git" + + "@" + + Var("dart_boringssl_gen_rev"), + "src/flutter/third_party/yapf": Var("flutter_git") + + "/third_party/yapf" + + "@" + + "212c5b5ad8e172d2d914ae454c121c89cccbcb35", + "src/flutter/third_party/boringssl/src": "https://boringssl.googlesource.com/boringssl.git" + + "@" + + Var("dart_boringssl_rev"), + "src/flutter/third_party/perfetto": Var("flutter_git") + + "/third_party/perfetto" + + "@" + + Var("dart_perfetto_rev"), + "src/flutter/third_party/protobuf": Var("flutter_git") + + "/third_party/protobuf" + + "@" + + Var("dart_libprotobuf_rev"), + # TODO(67373): These are temporarily checked in, but this dep can be restored + # once the buildmoot is completed. + # 'src/flutter/build/secondary/third_party/protobuf': + # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), + "src/flutter/third_party/dart": Var("dart_sdk_git") + + "@" + + Var("dart_sdk_revision"), + # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. + "src/flutter/third_party/dart/third_party/binaryen/src": Var("chromium_git") + + "/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9", + "src/flutter/third_party/dart/third_party/devtools": { + "dep_type": "cipd", + "packages": [ + { + "package": "dart/third_party/flutter/devtools", + "version": "git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056", + } + ], + }, + "src/flutter/third_party/dart/third_party/pkg/args": Var("dart_git") + + "/args.git@e623652744c82533829f2e62b1aba1a6cf06e291", + "src/flutter/third_party/dart/third_party/pkg/async": Var("dart_git") + + "/async.git@c0d81f8699682d01d657a9bf827107d11904a247", + "src/flutter/third_party/dart/third_party/pkg/bazel_worker": Var("dart_git") + + "/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac", + "src/flutter/third_party/dart/third_party/pkg/boolean_selector": Var("dart_git") + + "/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68", + "src/flutter/third_party/dart/third_party/pkg/browser_launcher": Var("dart_git") + + "/browser_launcher.git" + + "@" + + Var("dart_browser_launcher_rev"), + "src/flutter/third_party/dart/third_party/pkg/cli_util": Var("dart_git") + + "/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38", + "src/flutter/third_party/dart/third_party/pkg/clock": Var("dart_git") + + "/clock.git" + + "@" + + Var("dart_clock_rev"), + "src/flutter/third_party/dart/third_party/pkg/collection": Var("dart_git") + + "/collection.git" + + "@" + + Var("dart_collection_rev"), + "src/flutter/third_party/dart/third_party/pkg/convert": Var("dart_git") + + "/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a", + "src/flutter/third_party/dart/third_party/pkg/crypto": Var("dart_git") + + "/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57", + "src/flutter/third_party/dart/third_party/pkg/csslib": Var("dart_git") + + "/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249", + "src/flutter/third_party/dart/third_party/pkg/dart_style": Var("dart_git") + + "/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e", + "src/flutter/third_party/dart/third_party/pkg/dartdoc": Var("dart_git") + + "/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0", + "src/flutter/third_party/dart/third_party/pkg/file": Var("dart_git") + + "/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e", + "src/flutter/third_party/dart/third_party/pkg/fixnum": Var("dart_git") + + "/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0", + "src/flutter/third_party/dart/third_party/pkg/glob": Var("dart_git") + + "/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52", + "src/flutter/third_party/dart/third_party/pkg/html": Var("dart_git") + + "/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4", + "src/flutter/third_party/dart/third_party/pkg/http": Var("dart_git") + + "/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525", + "src/flutter/third_party/dart/third_party/pkg/http_multi_server": Var("dart_git") + + "/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0", + "src/flutter/third_party/dart/third_party/pkg/http_parser": Var("dart_git") + + "/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939", + "src/flutter/third_party/dart/third_party/pkg/intl": Var("dart_git") + + "/intl.git@5d65e3808ce40e6282e40881492607df4e35669f", + "src/flutter/third_party/dart/third_party/pkg/json_rpc_2": Var("dart_git") + + "/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce", + "src/flutter/third_party/dart/third_party/pkg/leak_tracker": Var("dart_git") + + "/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c", + "src/flutter/third_party/dart/third_party/pkg/logging": Var("dart_git") + + "/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e", + "src/flutter/third_party/dart/third_party/pkg/markdown": Var("dart_git") + + "/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40", + "src/flutter/third_party/dart/third_party/pkg/matcher": Var("dart_git") + + "/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c", + "src/flutter/third_party/dart/third_party/pkg/mockito": Var("dart_git") + + "/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab", + "src/flutter/third_party/dart/third_party/pkg/native": Var("dart_git") + + "/native.git@659511886501bcce638c3966590df04984909ef0", + "src/flutter/third_party/dart/third_party/pkg/package_config": Var("dart_git") + + "/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6", + "src/flutter/third_party/dart/third_party/pkg/path": Var("dart_git") + + "/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805", + "src/flutter/third_party/dart/third_party/pkg/pool": Var("dart_git") + + "/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a", + "src/flutter/third_party/dart/third_party/pkg/protobuf": Var("dart_git") + + "/protobuf.git" + + "@" + + Var("dart_protobuf_rev"), + "src/flutter/third_party/dart/third_party/pkg/pub": Var("dart_git") + + "/pub.git" + + "@" + + Var("dart_pub_rev"), + "src/flutter/third_party/dart/third_party/pkg/pub_semver": Var("dart_git") + + "/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02", + "src/flutter/third_party/dart/third_party/pkg/shelf": Var("dart_git") + + "/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36", + "src/flutter/third_party/dart/third_party/pkg/source_maps": Var("dart_git") + + "/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8", + "src/flutter/third_party/dart/third_party/pkg/source_span": Var("dart_git") + + "/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550", + "src/flutter/third_party/dart/third_party/pkg/sse": Var("dart_git") + + "/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79", + "src/flutter/third_party/dart/third_party/pkg/stack_trace": Var("dart_git") + + "/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525", + "src/flutter/third_party/dart/third_party/pkg/stream_channel": Var("dart_git") + + "/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825", + "src/flutter/third_party/dart/third_party/pkg/string_scanner": Var("dart_git") + + "/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01", + "src/flutter/third_party/dart/third_party/pkg/tar": Var("dart_git") + + "/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291", + "src/flutter/third_party/dart/third_party/pkg/term_glyph": Var("dart_git") + + "/term_glyph.git@19d8c08a4e81122639129c62049896021910c932", + "src/flutter/third_party/dart/third_party/pkg/test": Var("dart_git") + + "/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b", + "src/flutter/third_party/dart/third_party/pkg/test_reflective_loader": Var( + "dart_git" + ) + + "/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078", + "src/flutter/third_party/dart/third_party/pkg/tools": Var("dart_git") + + "/tools.git" + + "@" + + Var("dart_tools_rev"), + "src/flutter/third_party/dart/third_party/pkg/typed_data": Var("dart_git") + + "/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945", + "src/flutter/third_party/dart/third_party/pkg/watcher": Var("dart_git") + + "/watcher.git" + + "@" + + Var("dart_watcher_rev"), + "src/flutter/third_party/dart/third_party/pkg/web": Var("dart_git") + + "/web.git" + + "@" + + Var("dart_web_rev"), + "src/flutter/third_party/dart/third_party/pkg/web_socket_channel": Var("dart_git") + + "/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6", + "src/flutter/third_party/dart/third_party/pkg/webdev": Var("dart_git") + + "/webdev.git" + + "@" + + Var("dart_webdev_rev"), + "src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol": Var( + "dart_git" + ) + + "/external/github.com/google/webkit_inspection_protocol.dart.git" + + "@" + + Var("dart_webkit_inspection_protocol_rev"), + "src/flutter/third_party/dart/third_party/pkg/yaml": Var("dart_git") + + "/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15", + "src/flutter/third_party/dart/third_party/pkg/yaml_edit": Var("dart_git") + + "/yaml_edit.git" + + "@" + + Var("dart_yaml_edit_rev"), + "src/flutter/third_party/dart/tools/sdks/dart-sdk": { + "dep_type": "cipd", + "packages": [ + { + "package": "dart/dart-sdk/${{platform}}", + "version": "git_revision:7e6469bd51d404916395a47b011d907d2c905121", + } + ], + }, + # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. + # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout + "src/flutter/prebuilts/linux-x64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/linux-amd64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "linux" and download_dart_sdk', + }, + "src/flutter/prebuilts/linux-arm64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/linux-arm64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "linux" and download_dart_sdk', + }, + "src/flutter/prebuilts/macos-x64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/mac-amd64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "mac" and download_dart_sdk', + }, + "src/flutter/prebuilts/macos-arm64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/mac-arm64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "mac" and download_dart_sdk', + }, + "src/flutter/prebuilts/windows-x64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/windows-amd64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "win" and download_dart_sdk', + }, + "src/flutter/prebuilts/windows-arm64/dart-sdk": { + "packages": [ + { + "package": "flutter/dart-sdk/windows-arm64", + "version": "git_revision:" + Var("dart_revision"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "win" and download_dart_sdk', + }, + # esbuild download + "src/flutter/prebuilts/linux-x64/esbuild": { + "packages": [ + { + "package": "flutter/tools/esbuild/linux-amd64", + "version": Var("esbuild_version"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "linux" and download_esbuild', + }, + "src/flutter/prebuilts/macos-x64/esbuild": { + "packages": [ + { + "package": "flutter/tools/esbuild/mac-amd64", + "version": Var("esbuild_version"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "mac" and download_esbuild', + }, + "src/flutter/prebuilts/macos-arm64/esbuild": { + "packages": [ + { + "package": "flutter/tools/esbuild/mac-arm64", + "version": Var("esbuild_version"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "mac" and download_esbuild', + }, + "src/flutter/prebuilts/windows-x64/esbuild": { + "packages": [ + { + "package": "flutter/tools/esbuild/windows-amd64", + "version": Var("esbuild_version"), + } + ], + "dep_type": "cipd", + "condition": 'host_os == "win" and download_esbuild', + }, + "src/flutter/third_party/expat": Var("chromium_git") + + "/external/github.com/libexpat/libexpat.git" + + "@" + + "654d2de0da85662fcc7644a7acd7c2dd2cfb21f0", + "src/flutter/third_party/freetype2": Var("flutter_git") + + "/third_party/freetype2" + + "@" + + "bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a", + "src/flutter/third_party/skia": Var("skia_git") + + "/skia.git" + + "@" + + Var("skia_revision"), + "src/flutter/third_party/ocmock": Var("flutter_git") + + "/third_party/ocmock" + + "@" + + Var("ocmock_rev"), + "src/third_party/updater": Var("updater_git") + "@" + Var("updater_rev"), + "src/flutter/third_party/libjpeg-turbo/src": Var("flutter_git") + + "/third_party/libjpeg-turbo" + + "@" + + "0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f", + "src/flutter/third_party/libpng": Var("flutter_git") + + "/third_party/libpng" + + "@" + + "de36b892e921c684ef718fec24739ae9bb49c977", + "src/flutter/third_party/libwebp": Var("chromium_git") + + "/webm/libwebp.git" + + "@" + + "ca332209cb5567c9b249c86788cb2dbf8847e760", # 1.3.2 + "src/flutter/third_party/wuffs": Var("skia_git") + + "/external/github.com/google/wuffs-mirror-release-c.git" + + "@" + + "600cd96cf47788ee3a74b40a6028b035c9fd6a61", + "src/flutter/third_party/zlib": Var("chromium_git") + + "/chromium/src/third_party/zlib.git" + + "@" + + "7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df", + "src/flutter/third_party/cpu_features/src": Var("chromium_git") + + "/external/github.com/google/cpu_features.git" + + "@" + + "936b9ab5515dead115606559502e3864958f7f6e", + "src/flutter/third_party/inja": Var("flutter_git") + + "/third_party/inja" + + "@" + + "88bd6112575a80d004e551c98cf956f88ff4d445", + "src/flutter/third_party/libtess2": Var("flutter_git") + + "/third_party/libtess2" + + "@" + + "725e5e08ec8751477565f1d603fd7eb9058c277c", + "src/flutter/third_party/sqlite": Var("flutter_git") + + "/third_party/sqlite" + + "@" + + "0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c", + "src/flutter/third_party/pyyaml": Var("flutter_git") + + "/third_party/pyyaml.git" + + "@" + + "03c67afd452cdff45b41bfe65e19a2fb5b80a0e8", + "src/flutter/third_party/swiftshader": Var("swiftshader_git") + + "/SwiftShader.git" + + "@" + + "2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f", + "src/flutter/third_party/angle": Var("chromium_git") + + "/angle/angle.git" + + "@" + + "6a09e41ce6ea8c93524faae1a925eb01562f53b1", + "src/flutter/third_party/vulkan_memory_allocator": Var("chromium_git") + + "/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator" + + "@" + + "7de5cc00de50e71a3aab22dea52fbb7ff4efceb6", + "src/flutter/third_party/abseil-cpp": Var("flutter_git") + + "/third_party/abseil-cpp.git" + + "@" + + "ff6504dc527b25fef0f3c531e7dba0ed6b69c162", + # Dart packages + "src/flutter/third_party/pkg/archive": Var("chromium_git") + + "/external/github.com/brendan-duncan/archive.git" + + "@" + + "f1d164f8f5d8aea0be620a9b1e8d300b75a29388", # 3.6.1 + "src/flutter/third_party/pkg/coverage": Var("flutter_git") + + "/third_party/coverage.git" + + "@" + + "bb0ab721ee4ceef1abfa413d8d6fd46013b583b9", # 1.7.2 + "src/flutter/third_party/pkg/equatable": Var("flutter_git") + + "/third_party/equatable.git" + + "@" + + "2117551ff3054f8edb1a58f63ffe1832a8d25623", # 2.0.5 + "src/flutter/third_party/pkg/flutter_packages": Var("flutter_git") + + "/mirrors/packages" + + "@" + + "25454e63851fe7933f04d025606e68c1eac4fe0f", # various + "src/flutter/third_party/pkg/gcloud": Var("flutter_git") + + "/third_party/gcloud.git" + + "@" + + "a5276b85c4714378e84b1fb478b8feeeb686ac26", # 0.8.6-dev + "src/flutter/third_party/pkg/googleapis": Var("flutter_git") + + "/third_party/googleapis.dart.git" + + "@" + + "526011f56d98eab183cc6075ee1392e8303e43e2", # various + "src/flutter/third_party/pkg/io": Var("flutter_git") + + "/third_party/io.git" + + "@" + + "997a6243aad20af4238147d9ec00bf638b9169af", # 1.0.5-wip + "src/flutter/third_party/pkg/node_preamble": Var("flutter_git") + + "/third_party/node_preamble.dart.git" + + "@" + + "47245865175929ec452d8058e563c267b64c3d64", # 2.0.2 + "src/flutter/third_party/pkg/platform": Var("dart_git") + + "/platform.dart" + + "@" + + "1ffad63428bbd1b3ecaa15926bacfb724023648c", # 3.1.0 + "src/flutter/third_party/pkg/process": Var("dart_git") + + "/process.dart" + + "@" + + "0c9aeac86dcc4e3a6cf760b76fed507107e244d5", # 4.2.1 + "src/flutter/third_party/pkg/process_runner": Var("flutter_git") + + "/third_party/process_runner.git" + + "@" + + "f24c69efdcaf109168f23d381fa281453d2bc9b1", # 4.1.2 + "src/flutter/third_party/pkg/vector_math": Var("dart_git") + + "/external/github.com/google/vector_math.dart.git" + + "@" + + "0a5fd95449083d404df9768bc1b321b88a7d2eef", # 2.1.0 + "src/flutter/third_party/imgui": Var("flutter_git") + + "/third_party/imgui.git" + + "@" + + "3ea0fad204e994d669f79ed29dcaf61cd5cb571d", + "src/flutter/third_party/json": Var("flutter_git") + + "/third_party/json.git" + + "@" + + "17d9eacd248f58b73f4d1be518ef649fe2295642", + "src/flutter/third_party/stb": Var("flutter_git") + + "/third_party/stb.git" + + "@" + + "5736b15f7ea0ffb08dd38af21067c314d6a3aae9", + "src/flutter/third_party/gradle": { + "packages": [ + { + # See tools/gradle/README.md for update instructions. + # Version here means the CIPD tag. + "version": "version:8.9", + "package": "flutter/gradle", + } + ], + "condition": "download_android_deps", + "dep_type": "cipd", + }, + "src/flutter/third_party/android_tools/trace_to_text": { + "packages": [ + { + # 25.0 downloads for both mac-amd64 and mac-arm64 + # 26.1 is not found with either platform + # 27.1 is the latest release of perfetto + "version": "git_tag:v25.0", + "package": "perfetto/trace_to_text/${{platform}}", + } + ], + "condition": "download_android_deps", + "dep_type": "cipd", + }, + "src/flutter/third_party/android_tools/google-java-format": { + "packages": [ + { + "package": "flutter/android/google-java-format", + "version": "version:1.7-1", + } + ], + # We want to be able to format these as part of CI, and the CI step that + # checks formatting runs without downloading the rest of the Android build + # tooling. Therefore unlike all the other Android-related tools, we want to + # download this every time. + "dep_type": "cipd", + }, + "src/flutter/third_party/android_tools": { + "packages": [ + { + "package": "flutter/android/sdk/all/${{platform}}", + "version": "version:35v1", + } + ], + "condition": "download_android_deps", + "dep_type": "cipd", + }, + "src/flutter/third_party/android_embedding_dependencies": { + "packages": [ + { + "package": "flutter/android/embedding_bundle", + "version": "last_updated:2024-09-10T16:32:16-0700", + } + ], + "condition": "download_android_deps", + "dep_type": "cipd", + }, + "src/flutter/third_party/java/openjdk": { + "packages": [ + {"package": "flutter/java/openjdk/${{platform}}", "version": "version:17"} + ], + # Always download the JDK since java is required for running the formatter. + "dep_type": "cipd", + }, + "src/flutter/third_party/gn": { + "packages": [ + { + "package": "gn/gn/${{platform}}", + "version": "git_revision:b79031308cc878488202beb99883ec1f2efd9a6d", + }, + ], + "dep_type": "cipd", + }, + "src/flutter/third_party/ninja": { + "packages": [ + { + "package": "infra/3pp/tools/ninja/${{platform}}", + "version": "version:2@1.11.1.chromium.4", + } + ], + "dep_type": "cipd", + }, + "src/flutter/prebuilts/emsdk": { + "url": Var("skia_git") + + "/external/github.com/emscripten-core/emsdk.git" + + "@" + + "a896e3d066448b3530dbcaa48869fafefd738f57", + "condition": "download_emsdk", + }, + # Clang on mac and linux are expected to typically be the same revision. + # They are separated out so that the autoroller can more easily manage them. + "src/flutter/buildtools/mac-x64/clang": { + "packages": [ + { + "package": "fuchsia/third_party/clang/mac-amd64", + "version": Var("clang_version"), + } + ], + "condition": 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. + "dep_type": "cipd", + }, + "src/flutter/buildtools/mac-arm64/clang": { + "packages": [ + { + "package": "fuchsia/third_party/clang/mac-arm64", + "version": Var("clang_version"), + } + ], + "condition": 'host_os == "mac" and host_cpu == "arm64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/linux-x64/clang": { + "packages": [ + { + "package": "fuchsia/third_party/clang/linux-amd64", + "version": Var("clang_version"), + } + ], + "condition": 'host_os == "linux" or host_os == "mac"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/linux-arm64/clang": { + "packages": [ + { + "package": "fuchsia/third_party/clang/linux-arm64", + "version": Var("clang_version"), + } + ], + "condition": 'host_os == "linux" and host_cpu == "arm64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/windows-x64/clang": { + "packages": [ + { + "package": "fuchsia/third_party/clang/windows-amd64", + "version": Var("clang_version"), + } + ], + "condition": "download_windows_deps", + "dep_type": "cipd", + }, + # RBE binaries and configs. + "src/flutter/buildtools/linux-x64/reclient": { + "packages": [ + { + "package": "infra/rbe/client/${{platform}}", + "version": Var("reclient_version"), + } + ], + "condition": 'use_rbe and host_os == "linux" and host_cpu == "x64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/mac-arm64/reclient": { + "packages": [ + { + "package": "infra/rbe/client/${{platform}}", + "version": Var("reclient_version"), + } + ], + "condition": 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/mac-x64/reclient": { + "packages": [ + { + "package": "infra/rbe/client/${{platform}}", + "version": Var("reclient_version"), + } + ], + "condition": 'use_rbe and host_os == "mac" and host_cpu == "x64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/windows-x64/reclient": { + "packages": [ + { + "package": "infra/rbe/client/${{platform}}", + "version": Var("reclient_version"), + } + ], + "condition": "use_rbe and download_windows_deps", + "dep_type": "cipd", + }, + "src/flutter/build/rbe": { + "packages": [ + { + "package": "flutter_internal/rbe/reclient_cfgs", + "version": "XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC", + } + ], + "condition": "use_rbe", + "dep_type": "cipd", + }, + # gcloud + "src/flutter/buildtools/linux-x64/gcloud": { + "packages": [ + { + "package": "infra/3pp/tools/gcloud/${{platform}}", + "version": Var("gcloud_version"), + } + ], + "condition": 'use_rbe and host_os == "linux" and host_cpu == "x64"', + "dep_type": "cipd", + }, + "src/flutter/buildtools/mac-arm64/gcloud": { + "packages": [ + { + "package": "infra/3pp/tools/gcloud/${{platform}}", + "version": Var("gcloud_version"), + } + ], + "condition": 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + "dep_type": "cipd", + }, + # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag + # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag + "src/fuchsia/sdk/linux": { + "packages": [ + { + "package": "fuchsia/sdk/core/linux-amd64", + "version": "xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC", + } + ], + "condition": "download_fuchsia_deps and not download_fuchsia_sdk", + "dep_type": "cipd", + }, + "src/flutter/tools/fuchsia/test_scripts": { + "packages": [ + { + "package": "chromium/fuchsia/test-scripts", + "version": Var("fuchsia_test_scripts_version"), + } + ], + "condition": "download_fuchsia_deps", + "dep_type": "cipd", + }, + "src/flutter/tools/fuchsia/gn-sdk": { + "packages": [ + { + "package": "chromium/fuchsia/gn-sdk", + "version": Var("fuchsia_gn_sdk_version"), + } + ], + "condition": "download_fuchsia_deps", + "dep_type": "cipd", + }, + "src/flutter/third_party/impeller-cmake-example": { + "url": Var("flutter_git") + + "/third_party/impeller-cmake-example.git" + + "@" + + "9f8298ec31dcbebbf019bd487888166abf2f55e6", + "condition": "download_impeller_cmake_example", + }, + # cmake is only used by impeller-cmake-example. + "src/flutter/buildtools/mac-x64/cmake": { + "packages": [ + { + "package": "infra/3pp/tools/cmake/mac-amd64", + "version": "CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC", + } + ], + "condition": 'download_impeller_cmake_example and host_os == "mac"', + "dep_type": "cipd", + }, + "src/flutter/third_party/google_fonts_for_unit_tests": { + "packages": [ + { + "package": "flutter/flutter_font_fallbacks", + "version": "c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea", + } + ], + "dep_type": "cipd", + }, } recursedeps = [ From aeaea1777ea73de896e19bc0a9dcd1bf3469c985 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 20 Dec 2024 18:06:37 -0500 Subject: [PATCH 21/50] Remove prints --- shell/platform/windows/flutter_windows_engine.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 6b68ce6286aa9..bd78af2304f7b 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -1019,11 +1019,9 @@ void FlutterWindowsEngine::OnPreEngineRestart() { } std::string FlutterWindowsEngine::GetExecutableName() const { - FML_LOG(INFO) << "In GetExecutableName"; std::pair result = fml::paths::GetExecutablePath(); if (result.first) { const std::string& executable_path = result.second; - FML_LOG(INFO) << "executable_path: " << executable_path; size_t last_separator = executable_path.find_last_of("/\\"); if (last_separator == std::string::npos || last_separator == executable_path.size() - 1) { From 91640d2d4fef6a5baa7e97f61143a7d790867225 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 15:00:33 -0500 Subject: [PATCH 22/50] Cleanup --- shell/platform/windows/flutter_windows_engine.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index bd78af2304f7b..ab62c9441ced3 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -336,16 +336,12 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { if (filesystem::ReadFileToString(shorebird_yaml_path, shorebird_yaml_contents)) { auto code_cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; - auto appVersion = GetReleaseVersion(); - auto buildNumber = GetBuildNumber(); - auto buildNumberStr = std::to_string(buildNumber); auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); - FML_LOG(INFO) << "App path: " << app_path; flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( code_cache_path, code_cache_path, app_path, *shorebird_yaml_contents, - appVersion, buildNumberStr); + GetReleaseVersion(), std::to_string(GetBuildNumber())); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From 8593e7e12497dde2b13cfa228bc69e8f2a2740cf Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 15:07:33 -0500 Subject: [PATCH 23/50] fix deps --- DEPS | 2354 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 1187 insertions(+), 1167 deletions(-) diff --git a/DEPS b/DEPS index 1caf02818e793..70fa293f30df3 100644 --- a/DEPS +++ b/DEPS @@ -1,1167 +1,1187 @@ -# The dependencies referenced by the Flutter Engine. -# -# This file is referenced by the .gclient file at the root of the checkout. -# To preview changes to the dependencies, update this file and run -# `gclient sync`. -# -# When adding a new dependency, please update the top-level .gitignore file -# to list the dependency's destination directory. - -vars = { - "chromium_git": "https://chromium.googlesource.com", - "swiftshader_git": "https://swiftshader.googlesource.com", - "dart_git": "https://dart.googlesource.com", - "flutter_git": "https://flutter.googlesource.com", - "skia_git": "https://skia.googlesource.com", - "llvm_git": "https://llvm.googlesource.com", - "skia_revision": "6062afaa505bf7e6c727a20cafe4c7bee0f02df8", - "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", - "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", - "updater_git": "https://github.com/shorebirdtech/updater.git", - "updater_rev": "71b5ed65fab03fcf241edf0c74d027de9998da51", - # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY - # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. - "canvaskit_cipd_instance": "61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C", - # Do not download the Emscripten SDK by default. - # This prevents us from downloading the Emscripten toolchain for builds - # which do not build for the web. This toolchain is needed to build CanvasKit - # for the web engine. - "download_emsdk": False, - # For experimental features some dependencies may only be avaialable in the master/main - # channels. This variable is being set when CI is checking out the repository. - "release_candidate": False, - # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision - # should be kept up to date with the revisions pulled by Dart. - # - # The list of revisions for these tools comes from Fuchsia, here: - # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain - # If there are problems with the toolchain, contact fuchsia-toolchain@. - # - # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) - # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that - # updates to Clang Tidy will not turn the tree red. - # - # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit - "clang_version": "git_revision:725656bdd885483c39f482a01ea25d67acf39c46", - "reclient_version": "git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee", - "gcloud_version": "version:2@444.0.0.chromium.3", - "esbuild_version": "0.19.5", - # When updating the Dart revision, ensure that all entries that are - # dependencies of Dart are also updated to match the entries in the - # Dart SDK's DEPS file for that revision of Dart. The DEPS file for - # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS - # You can use //tools/dart/create_updated_flutter_deps.py to produce - # updated revision list of existing dependencies. - "dart_revision": "ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04", - # WARNING: DO NOT EDIT MANUALLY - # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py - "dart_binaryen_rev": "459bc0797f67cb2a8fd4598bb7143b34036608d9", - "dart_boringssl_gen_rev": "fef055e8d2749b82c79c8f043be1cbe5e8e4b40c", - "dart_boringssl_rev": "2db0eb3f96a5756298dcd7f9319e56a98585bd10", - "dart_browser_launcher_rev": "e5fc5d488eb5038bfec2a6690c72ab8dd353e101", - "dart_clock_rev": "7956d60042f4ea979c4554d43eeb57d087627869", - "dart_collection_rev": "24b75d85df6a26aac7be13b56ff1ce4360c04a64", - "dart_devtools_rev": "dcef4f6efe986f110f55dbbe7f3731802e86690a", - "dart_libprotobuf_rev": "24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb", - "dart_perfetto_rev": "13ce0c9e13b0940d2476cd0cff2301708a9a2e2b", - "dart_protobuf_gn_rev": "ca669f79945418f6229e4fef89b666b2a88cbb10", - "dart_protobuf_rev": "ccf104dbc36929c0f8708285d5f3a8fae206343e", - "dart_pub_rev": "1efd3f5e274e153637d99698b0ee454f6f2550ab", - "dart_tools_rev": "d4995d47b99d5e9564abfed2218f4a23df75983b", - "dart_watcher_rev": "3b850778ad0b62db3aa2cfe48832870c2461db30", - "dart_web_rev": "8478cd27d574249eca3d41f9135458dfda2762c8", - "dart_webdev_rev": "5f30c560dc4e3df341356c43ec1a766ee6b74a7c", - "dart_webkit_inspection_protocol_rev": "b459c427b74bf5e0919a083a97a167fb74d8bff1", - "dart_yaml_edit_rev": "5c54d455f272bbb83c948ac420c677371e69ae77", - "ocmock_rev": "c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8", # v3.7.1 - # Download a prebuilt Dart SDK by default - "download_dart_sdk": True, - # Download a prebuilt esbuild by default - "download_esbuild": True, - # Checkout Android dependencies only on platforms where we build for Android targets. - "download_android_deps": 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', - # Checkout Java dependencies only on platforms that do not have java installed on path. - "download_jdk": True, - # Checkout Windows dependencies only if we are building on Windows. - "download_windows_deps": 'host_os == "win"', - # Checkout Linux dependencies only when building on Linux. - "download_linux_deps": 'host_os == "linux"', - # The minimum macOS SDK version. This must match the setting in - # //flutter/tools/gn. - "mac_sdk_min": "10.14", - # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which - # controls the behavior of all fuchsia related flags. I.e. any fuchsia related - # logic or condition may not work if this flag is False. - # TODO(zijiehe): Make this condition more strict to only download fuchsia - # dependencies when necessary: b/40935282 - "download_fuchsia_deps": 'host_os == "linux"', - # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable - # is currently only used for the Fuchsia LSC process and is not intended for - # local development. - "download_fuchsia_sdk": False, - "fuchsia_sdk_path": "", - # Whether to download and run the Fuchsia emulator locally to test Fuchsia - # builds. - "run_fuchsia_emu": False, - # An LLVM backend needs LLVM binaries and headers. To avoid build time - # increases we can use prebuilts. We don't want to download this on every - # CQ/CI bot nor do we want the average Dart developer to incur that cost. - # So by default we will not download prebuilts. This variable is needed in - # the flutter engine to ensure that Dart gn has access to it as well. - "checkout_llvm": False, - # Setup Git hooks by default. - "setup_githooks": True, - # When this is true, the Flutter Engine's configuration files and scripts for - # RBE will be downloaded from CIPD. This option is only usable by Googlers. - "use_rbe": False, - # This is not downloaded be default because it increases the - # `gclient sync` time by between 1 and 3 minutes. This option is enabled - # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to - # only be useful locally when reproducing issues found by the bot. - "download_impeller_cmake_example": False, - # Upstream URLs for third party dependencies, used in - # determining common ancestor commit for vulnerability scanning - # prefixed with 'upstream_' in order to be identified by parsing tool. - # The vulnerability database being used in this scan can be browsed - # using this UI https://osv.dev/list - # If a new dependency needs to be added, the upstream (non-mirrored) - # git URL for that dependency should be added to this list - # with the key-value pair being: - # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' - # example: - "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", - "upstream_angle": "https://github.com/google/angle.git", - "upstream_archive": "https://github.com/brendan-duncan/archive.git", - "upstream_args": "https://github.com/dart-lang/args.git", - "upstream_async": "https://github.com/dart-lang/async.git", - "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", - "upstream_benchmark": "https://github.com/google/benchmark.git", - "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", - "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", - "upstream_boringssl": "https://github.com/openssl/openssl.git", - "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", - "upstream_buildroot": "https://github.com/flutter/buildroot.git", - "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", - "upstream_clock": "https://github.com/dart-lang/clock.git", - "upstream_collection": "https://github.com/dart-lang/collection.git", - "upstream_convert": "https://github.com/dart-lang/convert.git", - "upstream_crypto": "https://github.com/dart-lang/crypto.git", - "upstream_csslib": "https://github.com/dart-lang/csslib.git", - "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", - "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", - "upstream_equatable": "https://github.com/felangel/equatable.git", - "upstream_ffi": "https://github.com/dart-lang/ffi.git", - "upstream_file": "https://github.com/google/file.dart.git", - "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", - "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", - "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", - "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", - "upstream_glfw": "https://github.com/glfw/glfw.git", - "upstream_glob": "https://github.com/dart-lang/glob.git", - "upstream_googleapis": "https://github.com/google/googleapis.dart.git", - "upstream_googletest": "https://github.com/google/googletest.git", - "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", - "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", - "upstream_html": "https://github.com/dart-lang/html.git", - "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", - "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", - "upstream_http": "https://github.com/dart-lang/http.git", - "upstream_icu": "https://github.com/unicode-org/icu.git", - "upstream_intl": "https://github.com/dart-lang/intl.git", - "upstream_imgui": "https://github.com/ocornut/imgui.git", - "upstream_inja": "https://github.com/pantor/inja.git", - "upstream_json": "https://github.com/nlohmann/json.git", - "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", - "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", - "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", - "upstream_libexpat": "https://github.com/libexpat/libexpat.git", - "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", - "upstream_libpng": "https://github.com/glennrp/libpng.git", - "upstream_libtess2": "https://github.com/memononen/libtess2.git", - "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", - "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", - "upstream_logging": "https://github.com/dart-lang/logging.git", - "upstream_markdown": "https://github.com/dart-lang/markdown.git", - "upstream_matcher": "https://github.com/dart-lang/matcher.git", - "upstream_mockito": "https://github.com/dart-lang/mockito.git", - "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", - "upstream_package_config": "https://github.com/dart-lang/package_config.git", - "upstream_packages": "https://github.com/flutter/packages.git", - "upstream_path": "https://github.com/dart-lang/path.git", - "upstream_platform": "https://github.com/google/platform.dart.git", - "upstream_pool": "https://github.com/dart-lang/pool.git", - "upstream_process_runner": "https://github.com/google/process_runner.git", - "upstream_process": "https://github.com/google/process.dart.git", - "upstream_protobuf": "https://github.com/google/protobuf.dart.git", - "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", - "upstream_pub": "https://github.com/dart-lang/pub.git", - "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", - "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", - "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", - "upstream_sdk": "https://github.com/dart-lang/sdk.git", - "upstream_shaderc": "https://github.com/google/shaderc.git", - "upstream_shelf": "https://github.com/dart-lang/shelf.git", - "upstream_skia": "https://skia.googlesource.com/skia.git", - "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", - "upstream_source_span": "https://github.com/dart-lang/source_span.git", - "upstream_sqlite": "https://github.com/sqlite/sqlite.git", - "upstream_sse": "https://github.com/dart-lang/sse.git", - "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", - "upstream_stb": "https://github.com/nothings/stb.git", - "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", - "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", - "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", - "upstream_tar": "https://github.com/simolus3/tar.git", - "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", - "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", - "upstream_test": "https://github.com/dart-lang/test.git", - "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", - "upstream_usage": "https://github.com/dart-lang/usage.git", - "upstream_vector_math": "https://github.com/google/vector_math.dart.git", - "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", - "upstream_watcher": "https://github.com/dart-lang/watcher.git", - "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", - "upstream_webdev": "https://github.com/dart-lang/webdev.git", - "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", - "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", - "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", - "upstream_yaml": "https://github.com/dart-lang/yaml.git", - "upstream_yapf": "https://github.com/google/yapf.git", - "upstream_zlib": "https://github.com/madler/zlib.git", - # The version / instance id of the cipd:chromium/fuchsia/test-scripts which - # will be used altogether with fuchsia-sdk to setup the build / test - # environment. - "fuchsia_test_scripts_version": "_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC", - # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be - # used altogether with fuchsia-sdk to generate gn based build rules. - "fuchsia_gn_sdk_version": "tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC", -} - -gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" -gclient_gn_args = ["checkout_llvm"] - -# Only these hosts are allowed for dependencies in this DEPS file. -# If you need to add a new host, contact chrome infrastructure team. -allowed_hosts = [ - "boringssl.googlesource.com", - "chrome-infra-packages.appspot.com", - "chromium.googlesource.com", - "dart.googlesource.com", - "flutter.googlesource.com", - "llvm.googlesource.com", - "skia.googlesource.com", - "swiftshader.googlesource.com", -] - -deps = { - "src": "https://github.com/shorebirdtech/buildroot.git" - + "@" - + "4c5c8abd2ab1ac7c2c029503c71450a87bf94307", - "src/flutter/third_party/depot_tools": Var("chromium_git") - + "/chromium/tools/depot_tools.git" - + "@" - + "580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7", - "src/flutter/third_party/rapidjson": Var("flutter_git") - + "/third_party/rapidjson" - + "@" - + "ef3564c5c8824989393b87df25355baf35ff544b", - "src/flutter/third_party/harfbuzz": Var("flutter_git") - + "/third_party/harfbuzz" - + "@" - + "ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2", - "src/flutter/third_party/libcxx": Var("llvm_git") - + "/llvm-project/libcxx" - + "@" - + "44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0", - "src/flutter/third_party/libcxxabi": Var("llvm_git") - + "/llvm-project/libcxxabi" - + "@" - + "2ce528fb5e0f92e57c97ec3ff53b75359d33af12", - "src/flutter/third_party/glfw": Var("flutter_git") - + "/third_party/glfw" - + "@" - + "dd8a678a66f1967372e5a5e3deac41ebf65ee127", - "src/flutter/third_party/shaderc": Var("chromium_git") - + "/external/github.com/google/shaderc" - + "@" - + "37e25539ce199ecaf19fb7f7d27818716d36686d", - "src/flutter/third_party/vulkan-deps": Var("chromium_git") - + "/vulkan-deps" - + "@" - + "014f44e134a1de387791bffacc32ff9d8db71176", - "src/flutter/third_party/flatbuffers": Var("chromium_git") - + "/external/github.com/google/flatbuffers" - + "@" - + "0a80646371179f8a7a5c1f42c31ee1d44dcf6709", - "src/flutter/third_party/icu": Var("chromium_git") - + "/chromium/deps/icu.git" - + "@" - + "9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb", - "src/flutter/third_party/gtest-parallel": Var("chromium_git") - + "/external/github.com/google/gtest-parallel" - + "@" - + "38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14", - "src/flutter/third_party/benchmark": Var("chromium_git") - + "/external/github.com/google/benchmark" - + "@" - + "431abd149fd76a072f821913c0340137cc755f36", - "src/flutter/third_party/googletest": Var("chromium_git") - + "/external/github.com/google/googletest" - + "@" - + "7f036c5563af7d0329f20e8bb42effb04629f0c0", - "src/flutter/third_party/boringssl": Var("dart_git") - + "/boringssl_gen.git" - + "@" - + Var("dart_boringssl_gen_rev"), - "src/flutter/third_party/yapf": Var("flutter_git") - + "/third_party/yapf" - + "@" - + "212c5b5ad8e172d2d914ae454c121c89cccbcb35", - "src/flutter/third_party/boringssl/src": "https://boringssl.googlesource.com/boringssl.git" - + "@" - + Var("dart_boringssl_rev"), - "src/flutter/third_party/perfetto": Var("flutter_git") - + "/third_party/perfetto" - + "@" - + Var("dart_perfetto_rev"), - "src/flutter/third_party/protobuf": Var("flutter_git") - + "/third_party/protobuf" - + "@" - + Var("dart_libprotobuf_rev"), - # TODO(67373): These are temporarily checked in, but this dep can be restored - # once the buildmoot is completed. - # 'src/flutter/build/secondary/third_party/protobuf': - # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), - "src/flutter/third_party/dart": Var("dart_sdk_git") - + "@" - + Var("dart_sdk_revision"), - # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. - "src/flutter/third_party/dart/third_party/binaryen/src": Var("chromium_git") - + "/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9", - "src/flutter/third_party/dart/third_party/devtools": { - "dep_type": "cipd", - "packages": [ - { - "package": "dart/third_party/flutter/devtools", - "version": "git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056", - } - ], - }, - "src/flutter/third_party/dart/third_party/pkg/args": Var("dart_git") - + "/args.git@e623652744c82533829f2e62b1aba1a6cf06e291", - "src/flutter/third_party/dart/third_party/pkg/async": Var("dart_git") - + "/async.git@c0d81f8699682d01d657a9bf827107d11904a247", - "src/flutter/third_party/dart/third_party/pkg/bazel_worker": Var("dart_git") - + "/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac", - "src/flutter/third_party/dart/third_party/pkg/boolean_selector": Var("dart_git") - + "/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68", - "src/flutter/third_party/dart/third_party/pkg/browser_launcher": Var("dart_git") - + "/browser_launcher.git" - + "@" - + Var("dart_browser_launcher_rev"), - "src/flutter/third_party/dart/third_party/pkg/cli_util": Var("dart_git") - + "/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38", - "src/flutter/third_party/dart/third_party/pkg/clock": Var("dart_git") - + "/clock.git" - + "@" - + Var("dart_clock_rev"), - "src/flutter/third_party/dart/third_party/pkg/collection": Var("dart_git") - + "/collection.git" - + "@" - + Var("dart_collection_rev"), - "src/flutter/third_party/dart/third_party/pkg/convert": Var("dart_git") - + "/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a", - "src/flutter/third_party/dart/third_party/pkg/crypto": Var("dart_git") - + "/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57", - "src/flutter/third_party/dart/third_party/pkg/csslib": Var("dart_git") - + "/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249", - "src/flutter/third_party/dart/third_party/pkg/dart_style": Var("dart_git") - + "/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e", - "src/flutter/third_party/dart/third_party/pkg/dartdoc": Var("dart_git") - + "/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0", - "src/flutter/third_party/dart/third_party/pkg/file": Var("dart_git") - + "/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e", - "src/flutter/third_party/dart/third_party/pkg/fixnum": Var("dart_git") - + "/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0", - "src/flutter/third_party/dart/third_party/pkg/glob": Var("dart_git") - + "/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52", - "src/flutter/third_party/dart/third_party/pkg/html": Var("dart_git") - + "/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4", - "src/flutter/third_party/dart/third_party/pkg/http": Var("dart_git") - + "/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525", - "src/flutter/third_party/dart/third_party/pkg/http_multi_server": Var("dart_git") - + "/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0", - "src/flutter/third_party/dart/third_party/pkg/http_parser": Var("dart_git") - + "/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939", - "src/flutter/third_party/dart/third_party/pkg/intl": Var("dart_git") - + "/intl.git@5d65e3808ce40e6282e40881492607df4e35669f", - "src/flutter/third_party/dart/third_party/pkg/json_rpc_2": Var("dart_git") - + "/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce", - "src/flutter/third_party/dart/third_party/pkg/leak_tracker": Var("dart_git") - + "/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c", - "src/flutter/third_party/dart/third_party/pkg/logging": Var("dart_git") - + "/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e", - "src/flutter/third_party/dart/third_party/pkg/markdown": Var("dart_git") - + "/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40", - "src/flutter/third_party/dart/third_party/pkg/matcher": Var("dart_git") - + "/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c", - "src/flutter/third_party/dart/third_party/pkg/mockito": Var("dart_git") - + "/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab", - "src/flutter/third_party/dart/third_party/pkg/native": Var("dart_git") - + "/native.git@659511886501bcce638c3966590df04984909ef0", - "src/flutter/third_party/dart/third_party/pkg/package_config": Var("dart_git") - + "/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6", - "src/flutter/third_party/dart/third_party/pkg/path": Var("dart_git") - + "/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805", - "src/flutter/third_party/dart/third_party/pkg/pool": Var("dart_git") - + "/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a", - "src/flutter/third_party/dart/third_party/pkg/protobuf": Var("dart_git") - + "/protobuf.git" - + "@" - + Var("dart_protobuf_rev"), - "src/flutter/third_party/dart/third_party/pkg/pub": Var("dart_git") - + "/pub.git" - + "@" - + Var("dart_pub_rev"), - "src/flutter/third_party/dart/third_party/pkg/pub_semver": Var("dart_git") - + "/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02", - "src/flutter/third_party/dart/third_party/pkg/shelf": Var("dart_git") - + "/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36", - "src/flutter/third_party/dart/third_party/pkg/source_maps": Var("dart_git") - + "/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8", - "src/flutter/third_party/dart/third_party/pkg/source_span": Var("dart_git") - + "/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550", - "src/flutter/third_party/dart/third_party/pkg/sse": Var("dart_git") - + "/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79", - "src/flutter/third_party/dart/third_party/pkg/stack_trace": Var("dart_git") - + "/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525", - "src/flutter/third_party/dart/third_party/pkg/stream_channel": Var("dart_git") - + "/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825", - "src/flutter/third_party/dart/third_party/pkg/string_scanner": Var("dart_git") - + "/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01", - "src/flutter/third_party/dart/third_party/pkg/tar": Var("dart_git") - + "/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291", - "src/flutter/third_party/dart/third_party/pkg/term_glyph": Var("dart_git") - + "/term_glyph.git@19d8c08a4e81122639129c62049896021910c932", - "src/flutter/third_party/dart/third_party/pkg/test": Var("dart_git") - + "/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b", - "src/flutter/third_party/dart/third_party/pkg/test_reflective_loader": Var( - "dart_git" - ) - + "/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078", - "src/flutter/third_party/dart/third_party/pkg/tools": Var("dart_git") - + "/tools.git" - + "@" - + Var("dart_tools_rev"), - "src/flutter/third_party/dart/third_party/pkg/typed_data": Var("dart_git") - + "/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945", - "src/flutter/third_party/dart/third_party/pkg/watcher": Var("dart_git") - + "/watcher.git" - + "@" - + Var("dart_watcher_rev"), - "src/flutter/third_party/dart/third_party/pkg/web": Var("dart_git") - + "/web.git" - + "@" - + Var("dart_web_rev"), - "src/flutter/third_party/dart/third_party/pkg/web_socket_channel": Var("dart_git") - + "/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6", - "src/flutter/third_party/dart/third_party/pkg/webdev": Var("dart_git") - + "/webdev.git" - + "@" - + Var("dart_webdev_rev"), - "src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol": Var( - "dart_git" - ) - + "/external/github.com/google/webkit_inspection_protocol.dart.git" - + "@" - + Var("dart_webkit_inspection_protocol_rev"), - "src/flutter/third_party/dart/third_party/pkg/yaml": Var("dart_git") - + "/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15", - "src/flutter/third_party/dart/third_party/pkg/yaml_edit": Var("dart_git") - + "/yaml_edit.git" - + "@" - + Var("dart_yaml_edit_rev"), - "src/flutter/third_party/dart/tools/sdks/dart-sdk": { - "dep_type": "cipd", - "packages": [ - { - "package": "dart/dart-sdk/${{platform}}", - "version": "git_revision:7e6469bd51d404916395a47b011d907d2c905121", - } - ], - }, - # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. - # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout - "src/flutter/prebuilts/linux-x64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/linux-amd64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "linux" and download_dart_sdk', - }, - "src/flutter/prebuilts/linux-arm64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/linux-arm64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "linux" and download_dart_sdk', - }, - "src/flutter/prebuilts/macos-x64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/mac-amd64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "mac" and download_dart_sdk', - }, - "src/flutter/prebuilts/macos-arm64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/mac-arm64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "mac" and download_dart_sdk', - }, - "src/flutter/prebuilts/windows-x64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/windows-amd64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "win" and download_dart_sdk', - }, - "src/flutter/prebuilts/windows-arm64/dart-sdk": { - "packages": [ - { - "package": "flutter/dart-sdk/windows-arm64", - "version": "git_revision:" + Var("dart_revision"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "win" and download_dart_sdk', - }, - # esbuild download - "src/flutter/prebuilts/linux-x64/esbuild": { - "packages": [ - { - "package": "flutter/tools/esbuild/linux-amd64", - "version": Var("esbuild_version"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "linux" and download_esbuild', - }, - "src/flutter/prebuilts/macos-x64/esbuild": { - "packages": [ - { - "package": "flutter/tools/esbuild/mac-amd64", - "version": Var("esbuild_version"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "mac" and download_esbuild', - }, - "src/flutter/prebuilts/macos-arm64/esbuild": { - "packages": [ - { - "package": "flutter/tools/esbuild/mac-arm64", - "version": Var("esbuild_version"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "mac" and download_esbuild', - }, - "src/flutter/prebuilts/windows-x64/esbuild": { - "packages": [ - { - "package": "flutter/tools/esbuild/windows-amd64", - "version": Var("esbuild_version"), - } - ], - "dep_type": "cipd", - "condition": 'host_os == "win" and download_esbuild', - }, - "src/flutter/third_party/expat": Var("chromium_git") - + "/external/github.com/libexpat/libexpat.git" - + "@" - + "654d2de0da85662fcc7644a7acd7c2dd2cfb21f0", - "src/flutter/third_party/freetype2": Var("flutter_git") - + "/third_party/freetype2" - + "@" - + "bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a", - "src/flutter/third_party/skia": Var("skia_git") - + "/skia.git" - + "@" - + Var("skia_revision"), - "src/flutter/third_party/ocmock": Var("flutter_git") - + "/third_party/ocmock" - + "@" - + Var("ocmock_rev"), - "src/third_party/updater": Var("updater_git") + "@" + Var("updater_rev"), - "src/flutter/third_party/libjpeg-turbo/src": Var("flutter_git") - + "/third_party/libjpeg-turbo" - + "@" - + "0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f", - "src/flutter/third_party/libpng": Var("flutter_git") - + "/third_party/libpng" - + "@" - + "de36b892e921c684ef718fec24739ae9bb49c977", - "src/flutter/third_party/libwebp": Var("chromium_git") - + "/webm/libwebp.git" - + "@" - + "ca332209cb5567c9b249c86788cb2dbf8847e760", # 1.3.2 - "src/flutter/third_party/wuffs": Var("skia_git") - + "/external/github.com/google/wuffs-mirror-release-c.git" - + "@" - + "600cd96cf47788ee3a74b40a6028b035c9fd6a61", - "src/flutter/third_party/zlib": Var("chromium_git") - + "/chromium/src/third_party/zlib.git" - + "@" - + "7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df", - "src/flutter/third_party/cpu_features/src": Var("chromium_git") - + "/external/github.com/google/cpu_features.git" - + "@" - + "936b9ab5515dead115606559502e3864958f7f6e", - "src/flutter/third_party/inja": Var("flutter_git") - + "/third_party/inja" - + "@" - + "88bd6112575a80d004e551c98cf956f88ff4d445", - "src/flutter/third_party/libtess2": Var("flutter_git") - + "/third_party/libtess2" - + "@" - + "725e5e08ec8751477565f1d603fd7eb9058c277c", - "src/flutter/third_party/sqlite": Var("flutter_git") - + "/third_party/sqlite" - + "@" - + "0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c", - "src/flutter/third_party/pyyaml": Var("flutter_git") - + "/third_party/pyyaml.git" - + "@" - + "03c67afd452cdff45b41bfe65e19a2fb5b80a0e8", - "src/flutter/third_party/swiftshader": Var("swiftshader_git") - + "/SwiftShader.git" - + "@" - + "2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f", - "src/flutter/third_party/angle": Var("chromium_git") - + "/angle/angle.git" - + "@" - + "6a09e41ce6ea8c93524faae1a925eb01562f53b1", - "src/flutter/third_party/vulkan_memory_allocator": Var("chromium_git") - + "/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator" - + "@" - + "7de5cc00de50e71a3aab22dea52fbb7ff4efceb6", - "src/flutter/third_party/abseil-cpp": Var("flutter_git") - + "/third_party/abseil-cpp.git" - + "@" - + "ff6504dc527b25fef0f3c531e7dba0ed6b69c162", - # Dart packages - "src/flutter/third_party/pkg/archive": Var("chromium_git") - + "/external/github.com/brendan-duncan/archive.git" - + "@" - + "f1d164f8f5d8aea0be620a9b1e8d300b75a29388", # 3.6.1 - "src/flutter/third_party/pkg/coverage": Var("flutter_git") - + "/third_party/coverage.git" - + "@" - + "bb0ab721ee4ceef1abfa413d8d6fd46013b583b9", # 1.7.2 - "src/flutter/third_party/pkg/equatable": Var("flutter_git") - + "/third_party/equatable.git" - + "@" - + "2117551ff3054f8edb1a58f63ffe1832a8d25623", # 2.0.5 - "src/flutter/third_party/pkg/flutter_packages": Var("flutter_git") - + "/mirrors/packages" - + "@" - + "25454e63851fe7933f04d025606e68c1eac4fe0f", # various - "src/flutter/third_party/pkg/gcloud": Var("flutter_git") - + "/third_party/gcloud.git" - + "@" - + "a5276b85c4714378e84b1fb478b8feeeb686ac26", # 0.8.6-dev - "src/flutter/third_party/pkg/googleapis": Var("flutter_git") - + "/third_party/googleapis.dart.git" - + "@" - + "526011f56d98eab183cc6075ee1392e8303e43e2", # various - "src/flutter/third_party/pkg/io": Var("flutter_git") - + "/third_party/io.git" - + "@" - + "997a6243aad20af4238147d9ec00bf638b9169af", # 1.0.5-wip - "src/flutter/third_party/pkg/node_preamble": Var("flutter_git") - + "/third_party/node_preamble.dart.git" - + "@" - + "47245865175929ec452d8058e563c267b64c3d64", # 2.0.2 - "src/flutter/third_party/pkg/platform": Var("dart_git") - + "/platform.dart" - + "@" - + "1ffad63428bbd1b3ecaa15926bacfb724023648c", # 3.1.0 - "src/flutter/third_party/pkg/process": Var("dart_git") - + "/process.dart" - + "@" - + "0c9aeac86dcc4e3a6cf760b76fed507107e244d5", # 4.2.1 - "src/flutter/third_party/pkg/process_runner": Var("flutter_git") - + "/third_party/process_runner.git" - + "@" - + "f24c69efdcaf109168f23d381fa281453d2bc9b1", # 4.1.2 - "src/flutter/third_party/pkg/vector_math": Var("dart_git") - + "/external/github.com/google/vector_math.dart.git" - + "@" - + "0a5fd95449083d404df9768bc1b321b88a7d2eef", # 2.1.0 - "src/flutter/third_party/imgui": Var("flutter_git") - + "/third_party/imgui.git" - + "@" - + "3ea0fad204e994d669f79ed29dcaf61cd5cb571d", - "src/flutter/third_party/json": Var("flutter_git") - + "/third_party/json.git" - + "@" - + "17d9eacd248f58b73f4d1be518ef649fe2295642", - "src/flutter/third_party/stb": Var("flutter_git") - + "/third_party/stb.git" - + "@" - + "5736b15f7ea0ffb08dd38af21067c314d6a3aae9", - "src/flutter/third_party/gradle": { - "packages": [ - { - # See tools/gradle/README.md for update instructions. - # Version here means the CIPD tag. - "version": "version:8.9", - "package": "flutter/gradle", - } - ], - "condition": "download_android_deps", - "dep_type": "cipd", - }, - "src/flutter/third_party/android_tools/trace_to_text": { - "packages": [ - { - # 25.0 downloads for both mac-amd64 and mac-arm64 - # 26.1 is not found with either platform - # 27.1 is the latest release of perfetto - "version": "git_tag:v25.0", - "package": "perfetto/trace_to_text/${{platform}}", - } - ], - "condition": "download_android_deps", - "dep_type": "cipd", - }, - "src/flutter/third_party/android_tools/google-java-format": { - "packages": [ - { - "package": "flutter/android/google-java-format", - "version": "version:1.7-1", - } - ], - # We want to be able to format these as part of CI, and the CI step that - # checks formatting runs without downloading the rest of the Android build - # tooling. Therefore unlike all the other Android-related tools, we want to - # download this every time. - "dep_type": "cipd", - }, - "src/flutter/third_party/android_tools": { - "packages": [ - { - "package": "flutter/android/sdk/all/${{platform}}", - "version": "version:35v1", - } - ], - "condition": "download_android_deps", - "dep_type": "cipd", - }, - "src/flutter/third_party/android_embedding_dependencies": { - "packages": [ - { - "package": "flutter/android/embedding_bundle", - "version": "last_updated:2024-09-10T16:32:16-0700", - } - ], - "condition": "download_android_deps", - "dep_type": "cipd", - }, - "src/flutter/third_party/java/openjdk": { - "packages": [ - {"package": "flutter/java/openjdk/${{platform}}", "version": "version:17"} - ], - # Always download the JDK since java is required for running the formatter. - "dep_type": "cipd", - }, - "src/flutter/third_party/gn": { - "packages": [ - { - "package": "gn/gn/${{platform}}", - "version": "git_revision:b79031308cc878488202beb99883ec1f2efd9a6d", - }, - ], - "dep_type": "cipd", - }, - "src/flutter/third_party/ninja": { - "packages": [ - { - "package": "infra/3pp/tools/ninja/${{platform}}", - "version": "version:2@1.11.1.chromium.4", - } - ], - "dep_type": "cipd", - }, - "src/flutter/prebuilts/emsdk": { - "url": Var("skia_git") - + "/external/github.com/emscripten-core/emsdk.git" - + "@" - + "a896e3d066448b3530dbcaa48869fafefd738f57", - "condition": "download_emsdk", - }, - # Clang on mac and linux are expected to typically be the same revision. - # They are separated out so that the autoroller can more easily manage them. - "src/flutter/buildtools/mac-x64/clang": { - "packages": [ - { - "package": "fuchsia/third_party/clang/mac-amd64", - "version": Var("clang_version"), - } - ], - "condition": 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. - "dep_type": "cipd", - }, - "src/flutter/buildtools/mac-arm64/clang": { - "packages": [ - { - "package": "fuchsia/third_party/clang/mac-arm64", - "version": Var("clang_version"), - } - ], - "condition": 'host_os == "mac" and host_cpu == "arm64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/linux-x64/clang": { - "packages": [ - { - "package": "fuchsia/third_party/clang/linux-amd64", - "version": Var("clang_version"), - } - ], - "condition": 'host_os == "linux" or host_os == "mac"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/linux-arm64/clang": { - "packages": [ - { - "package": "fuchsia/third_party/clang/linux-arm64", - "version": Var("clang_version"), - } - ], - "condition": 'host_os == "linux" and host_cpu == "arm64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/windows-x64/clang": { - "packages": [ - { - "package": "fuchsia/third_party/clang/windows-amd64", - "version": Var("clang_version"), - } - ], - "condition": "download_windows_deps", - "dep_type": "cipd", - }, - # RBE binaries and configs. - "src/flutter/buildtools/linux-x64/reclient": { - "packages": [ - { - "package": "infra/rbe/client/${{platform}}", - "version": Var("reclient_version"), - } - ], - "condition": 'use_rbe and host_os == "linux" and host_cpu == "x64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/mac-arm64/reclient": { - "packages": [ - { - "package": "infra/rbe/client/${{platform}}", - "version": Var("reclient_version"), - } - ], - "condition": 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/mac-x64/reclient": { - "packages": [ - { - "package": "infra/rbe/client/${{platform}}", - "version": Var("reclient_version"), - } - ], - "condition": 'use_rbe and host_os == "mac" and host_cpu == "x64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/windows-x64/reclient": { - "packages": [ - { - "package": "infra/rbe/client/${{platform}}", - "version": Var("reclient_version"), - } - ], - "condition": "use_rbe and download_windows_deps", - "dep_type": "cipd", - }, - "src/flutter/build/rbe": { - "packages": [ - { - "package": "flutter_internal/rbe/reclient_cfgs", - "version": "XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC", - } - ], - "condition": "use_rbe", - "dep_type": "cipd", - }, - # gcloud - "src/flutter/buildtools/linux-x64/gcloud": { - "packages": [ - { - "package": "infra/3pp/tools/gcloud/${{platform}}", - "version": Var("gcloud_version"), - } - ], - "condition": 'use_rbe and host_os == "linux" and host_cpu == "x64"', - "dep_type": "cipd", - }, - "src/flutter/buildtools/mac-arm64/gcloud": { - "packages": [ - { - "package": "infra/3pp/tools/gcloud/${{platform}}", - "version": Var("gcloud_version"), - } - ], - "condition": 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - "dep_type": "cipd", - }, - # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag - # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag - "src/fuchsia/sdk/linux": { - "packages": [ - { - "package": "fuchsia/sdk/core/linux-amd64", - "version": "xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC", - } - ], - "condition": "download_fuchsia_deps and not download_fuchsia_sdk", - "dep_type": "cipd", - }, - "src/flutter/tools/fuchsia/test_scripts": { - "packages": [ - { - "package": "chromium/fuchsia/test-scripts", - "version": Var("fuchsia_test_scripts_version"), - } - ], - "condition": "download_fuchsia_deps", - "dep_type": "cipd", - }, - "src/flutter/tools/fuchsia/gn-sdk": { - "packages": [ - { - "package": "chromium/fuchsia/gn-sdk", - "version": Var("fuchsia_gn_sdk_version"), - } - ], - "condition": "download_fuchsia_deps", - "dep_type": "cipd", - }, - "src/flutter/third_party/impeller-cmake-example": { - "url": Var("flutter_git") - + "/third_party/impeller-cmake-example.git" - + "@" - + "9f8298ec31dcbebbf019bd487888166abf2f55e6", - "condition": "download_impeller_cmake_example", - }, - # cmake is only used by impeller-cmake-example. - "src/flutter/buildtools/mac-x64/cmake": { - "packages": [ - { - "package": "infra/3pp/tools/cmake/mac-amd64", - "version": "CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC", - } - ], - "condition": 'download_impeller_cmake_example and host_os == "mac"', - "dep_type": "cipd", - }, - "src/flutter/third_party/google_fonts_for_unit_tests": { - "packages": [ - { - "package": "flutter/flutter_font_fallbacks", - "version": "c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea", - } - ], - "dep_type": "cipd", - }, -} - -recursedeps = [ - "src/flutter/third_party/vulkan-deps", -] - -hooks = [ - { - # Generate the Dart SDK's .dart_tool/package_confg.json file. - "name": "Generate .dart_tool/package_confg.json", - "pattern": ".", - "action": [ - "python3", - "src/flutter/third_party/dart/tools/generate_package_config.py", - ], - }, - { - # Generate the sdk/version file. - "name": "Generate sdk/version", - "pattern": ".", - "action": [ - "python3", - "src/flutter/third_party/dart/tools/generate_sdk_version_file.py", - ], - }, - { - # Update the Windows toolchain if necessary. - "name": "win_toolchain", - "condition": "download_windows_deps", - "pattern": ".", - "action": ["python3", "src/build/vs_toolchain.py", "update"], - }, - { - "name": "dia_dll", - "pattern": ".", - "condition": "download_windows_deps", - "action": [ - "python3", - "src/flutter/tools/dia_dll.py", - ], - }, - { - "name": "linux_sysroot_x64", - "pattern": ".", - "condition": "download_linux_deps", - "action": [ - "python3", - "src/build/linux/sysroot_scripts/install-sysroot.py", - "--arch=x64", - ], - }, - { - "name": "linux_sysroot_arm64", - "pattern": ".", - "condition": "download_linux_deps", - "action": [ - "python3", - "src/build/linux/sysroot_scripts/install-sysroot.py", - "--arch=arm64", - ], - }, - { - "name": "pub get --offline", - "pattern": ".", - "action": [ - "python3", - "src/flutter/tools/pub_get_offline.py", - ], - }, - { - "name": "Download Fuchsia SDK", - "pattern": ".", - "condition": "download_fuchsia_deps and download_fuchsia_sdk", - "action": [ - "python3", - "src/flutter/tools/download_fuchsia_sdk.py", - "--fail-loudly", - "--verbose", - "--host-os", - Var("host_os"), - "--fuchsia-sdk-path", - Var("fuchsia_sdk_path"), - ], - }, - { - "name": "Activate Emscripten SDK", - "pattern": ".", - "condition": "download_emsdk", - "action": [ - "python3", - "src/flutter/tools/activate_emsdk.py", - ], - }, - { - "name": "Setup githooks", - "pattern": ".", - "condition": "setup_githooks", - "action": [ - "python3", - "src/flutter/tools/githooks/setup.py", - ], - }, - { - "name": "impeller-cmake-example submodules", - "pattern": ".", - "condition": "download_impeller_cmake_example", - "action": [ - "python3", - "src/flutter/ci/impeller_cmake_build_test.py", - "--path", - "flutter/third_party/impeller-cmake-example", - "--setup", - ], - }, - { - "name": "Download Fuchsia system images", - "pattern": ".", - "condition": "run_fuchsia_emu", - "action": [ - "env", - "DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}", - "FUCHSIA_SDK_PATH={fuchsia_sdk_path}", - "python3", - "src/flutter/tools/fuchsia/with_envs.py", - "src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py", - "terminal.x64,terminal.qemu-arm64", - ], - }, - # The following two scripts check if they are running in the LUCI - # environment, and do nothing if so. This is because Xcode is not yet - # installed in CI when these hooks are run. - { - "name": "Find the iOS device SDKs", - "pattern": ".", - "condition": 'host_os == "mac"', - "action": [ - "python3", - "src/build/config/ios/ios_sdk.py", - # This cleans up entries under flutter/prebuilts for this script and the - # following script. - "--as-gclient-hook", - ], - }, - { - "name": "Find the macOS SDK", - "pattern": ".", - "condition": 'host_os == "mac"', - "action": [ - "python3", - "src/build/mac/find_sdk.py", - "--as-gclient-hook", - Var("mac_sdk_min"), - ], - }, - { - "name": "Generate Fuchsia GN build rules", - "pattern": ".", - "condition": "download_fuchsia_deps", - "action": [ - "python3", - "src/flutter/tools/fuchsia/with_envs.py", - "src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py", - ], - }, -] +# The dependencies referenced by the Flutter Engine. +# +# This file is referenced by the .gclient file at the root of the checkout. +# To preview changes to the dependencies, update this file and run +# `gclient sync`. +# +# When adding a new dependency, please update the top-level .gitignore file +# to list the dependency's destination directory. + +vars = { + 'chromium_git': 'https://chromium.googlesource.com', + 'swiftshader_git': 'https://swiftshader.googlesource.com', + 'dart_git': 'https://dart.googlesource.com', + 'flutter_git': 'https://flutter.googlesource.com', + 'skia_git': 'https://skia.googlesource.com', + 'llvm_git': 'https://llvm.googlesource.com', + 'skia_revision': '6062afaa505bf7e6c727a20cafe4c7bee0f02df8', + "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", + "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", + "updater_git": "https://github.com/shorebirdtech/updater.git", + "updater_rev": "71b5ed65fab03fcf241edf0c74d027de9998da51", + + # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY + # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. + 'canvaskit_cipd_instance': '61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C', + + # Do not download the Emscripten SDK by default. + # This prevents us from downloading the Emscripten toolchain for builds + # which do not build for the web. This toolchain is needed to build CanvasKit + # for the web engine. + 'download_emsdk': False, + + # For experimental features some dependencies may only be avaialable in the master/main + # channels. This variable is being set when CI is checking out the repository. + 'release_candidate': False, + + # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision + # should be kept up to date with the revisions pulled by Dart. + # + # The list of revisions for these tools comes from Fuchsia, here: + # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain + # If there are problems with the toolchain, contact fuchsia-toolchain@. + # + # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) + # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that + # updates to Clang Tidy will not turn the tree red. + # + # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit + 'clang_version': 'git_revision:725656bdd885483c39f482a01ea25d67acf39c46', + + 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', + + 'gcloud_version': 'version:2@444.0.0.chromium.3', + + 'esbuild_version': '0.19.5', + + # When updating the Dart revision, ensure that all entries that are + # dependencies of Dart are also updated to match the entries in the + # Dart SDK's DEPS file for that revision of Dart. The DEPS file for + # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS + # You can use //tools/dart/create_updated_flutter_deps.py to produce + # updated revision list of existing dependencies. + 'dart_revision': 'ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04', + + # WARNING: DO NOT EDIT MANUALLY + # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py + 'dart_binaryen_rev': '459bc0797f67cb2a8fd4598bb7143b34036608d9', + 'dart_boringssl_gen_rev': 'fef055e8d2749b82c79c8f043be1cbe5e8e4b40c', + 'dart_boringssl_rev': '2db0eb3f96a5756298dcd7f9319e56a98585bd10', + 'dart_browser_launcher_rev': 'e5fc5d488eb5038bfec2a6690c72ab8dd353e101', + 'dart_clock_rev': '7956d60042f4ea979c4554d43eeb57d087627869', + 'dart_collection_rev': '24b75d85df6a26aac7be13b56ff1ce4360c04a64', + 'dart_devtools_rev': 'dcef4f6efe986f110f55dbbe7f3731802e86690a', + 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', + 'dart_perfetto_rev': '13ce0c9e13b0940d2476cd0cff2301708a9a2e2b', + 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', + 'dart_protobuf_rev': 'ccf104dbc36929c0f8708285d5f3a8fae206343e', + 'dart_pub_rev': '1efd3f5e274e153637d99698b0ee454f6f2550ab', + 'dart_tools_rev': 'd4995d47b99d5e9564abfed2218f4a23df75983b', + 'dart_watcher_rev': '3b850778ad0b62db3aa2cfe48832870c2461db30', + 'dart_web_rev': '8478cd27d574249eca3d41f9135458dfda2762c8', + 'dart_webdev_rev': '5f30c560dc4e3df341356c43ec1a766ee6b74a7c', + 'dart_webkit_inspection_protocol_rev': 'b459c427b74bf5e0919a083a97a167fb74d8bff1', + 'dart_yaml_edit_rev': '5c54d455f272bbb83c948ac420c677371e69ae77', + + 'ocmock_rev': 'c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8', # v3.7.1 + + # Download a prebuilt Dart SDK by default + 'download_dart_sdk': True, + + # Download a prebuilt esbuild by default + 'download_esbuild': True, + + # Checkout Android dependencies only on platforms where we build for Android targets. + 'download_android_deps': 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', + + # Checkout Java dependencies only on platforms that do not have java installed on path. + 'download_jdk': True, + + # Checkout Windows dependencies only if we are building on Windows. + 'download_windows_deps' : 'host_os == "win"', + + # Checkout Linux dependencies only when building on Linux. + 'download_linux_deps': 'host_os == "linux"', + + # The minimum macOS SDK version. This must match the setting in + # //flutter/tools/gn. + 'mac_sdk_min': '10.14', + + # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which + # controls the behavior of all fuchsia related flags. I.e. any fuchsia related + # logic or condition may not work if this flag is False. + # TODO(zijiehe): Make this condition more strict to only download fuchsia + # dependencies when necessary: b/40935282 + 'download_fuchsia_deps': 'host_os == "linux"', + # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable + # is currently only used for the Fuchsia LSC process and is not intended for + # local development. + 'download_fuchsia_sdk': False, + 'fuchsia_sdk_path': '', + # Whether to download and run the Fuchsia emulator locally to test Fuchsia + # builds. + 'run_fuchsia_emu': False, + + # An LLVM backend needs LLVM binaries and headers. To avoid build time + # increases we can use prebuilts. We don't want to download this on every + # CQ/CI bot nor do we want the average Dart developer to incur that cost. + # So by default we will not download prebuilts. This variable is needed in + # the flutter engine to ensure that Dart gn has access to it as well. + "checkout_llvm": False, + + # Setup Git hooks by default. + 'setup_githooks': True, + + # When this is true, the Flutter Engine's configuration files and scripts for + # RBE will be downloaded from CIPD. This option is only usable by Googlers. + 'use_rbe': False, + + # This is not downloaded be default because it increases the + # `gclient sync` time by between 1 and 3 minutes. This option is enabled + # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to + # only be useful locally when reproducing issues found by the bot. + 'download_impeller_cmake_example': False, + + # Upstream URLs for third party dependencies, used in + # determining common ancestor commit for vulnerability scanning + # prefixed with 'upstream_' in order to be identified by parsing tool. + # The vulnerability database being used in this scan can be browsed + # using this UI https://osv.dev/list + # If a new dependency needs to be added, the upstream (non-mirrored) + # git URL for that dependency should be added to this list + # with the key-value pair being: + # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' + # example: + "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", + "upstream_angle": "https://github.com/google/angle.git", + "upstream_archive": "https://github.com/brendan-duncan/archive.git", + "upstream_args": "https://github.com/dart-lang/args.git", + "upstream_async": "https://github.com/dart-lang/async.git", + "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", + "upstream_benchmark": "https://github.com/google/benchmark.git", + "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", + "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", + "upstream_boringssl": "https://github.com/openssl/openssl.git", + "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", + "upstream_buildroot": "https://github.com/flutter/buildroot.git", + "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", + "upstream_clock": "https://github.com/dart-lang/clock.git", + "upstream_collection": "https://github.com/dart-lang/collection.git", + "upstream_convert": "https://github.com/dart-lang/convert.git", + "upstream_crypto": "https://github.com/dart-lang/crypto.git", + "upstream_csslib": "https://github.com/dart-lang/csslib.git", + "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", + "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", + "upstream_equatable": "https://github.com/felangel/equatable.git", + "upstream_ffi": "https://github.com/dart-lang/ffi.git", + "upstream_file": "https://github.com/google/file.dart.git", + "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", + "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", + "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", + "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", + "upstream_glfw": "https://github.com/glfw/glfw.git", + "upstream_glob": "https://github.com/dart-lang/glob.git", + "upstream_googleapis": "https://github.com/google/googleapis.dart.git", + "upstream_googletest": "https://github.com/google/googletest.git", + "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", + "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", + "upstream_html": "https://github.com/dart-lang/html.git", + "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", + "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", + "upstream_http": "https://github.com/dart-lang/http.git", + "upstream_icu": "https://github.com/unicode-org/icu.git", + "upstream_intl": "https://github.com/dart-lang/intl.git", + "upstream_imgui": "https://github.com/ocornut/imgui.git", + "upstream_inja": "https://github.com/pantor/inja.git", + "upstream_json": "https://github.com/nlohmann/json.git", + "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", + "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", + "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", + "upstream_libexpat": "https://github.com/libexpat/libexpat.git", + "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", + "upstream_libpng": "https://github.com/glennrp/libpng.git", + "upstream_libtess2": "https://github.com/memononen/libtess2.git", + "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", + "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", + "upstream_logging": "https://github.com/dart-lang/logging.git", + "upstream_markdown": "https://github.com/dart-lang/markdown.git", + "upstream_matcher": "https://github.com/dart-lang/matcher.git", + "upstream_mockito": "https://github.com/dart-lang/mockito.git", + "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", + "upstream_package_config": "https://github.com/dart-lang/package_config.git", + "upstream_packages": "https://github.com/flutter/packages.git", + "upstream_path": "https://github.com/dart-lang/path.git", + "upstream_platform": "https://github.com/google/platform.dart.git", + "upstream_pool": "https://github.com/dart-lang/pool.git", + "upstream_process_runner": "https://github.com/google/process_runner.git", + "upstream_process": "https://github.com/google/process.dart.git", + "upstream_protobuf": "https://github.com/google/protobuf.dart.git", + "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", + "upstream_pub": "https://github.com/dart-lang/pub.git", + "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", + "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", + "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", + "upstream_sdk": "https://github.com/dart-lang/sdk.git", + "upstream_shaderc": "https://github.com/google/shaderc.git", + "upstream_shelf": "https://github.com/dart-lang/shelf.git", + "upstream_skia": "https://skia.googlesource.com/skia.git", + "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", + "upstream_source_span": "https://github.com/dart-lang/source_span.git", + "upstream_sqlite": "https://github.com/sqlite/sqlite.git", + "upstream_sse": "https://github.com/dart-lang/sse.git", + "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", + "upstream_stb": "https://github.com/nothings/stb.git", + "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", + "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", + "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", + "upstream_tar": "https://github.com/simolus3/tar.git", + "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", + "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", + "upstream_test": "https://github.com/dart-lang/test.git", + "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", + "upstream_usage": "https://github.com/dart-lang/usage.git", + "upstream_vector_math": "https://github.com/google/vector_math.dart.git", + "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", + "upstream_watcher": "https://github.com/dart-lang/watcher.git", + "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", + "upstream_webdev": "https://github.com/dart-lang/webdev.git", + "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", + "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", + "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", + "upstream_yaml": "https://github.com/dart-lang/yaml.git", + "upstream_yapf": "https://github.com/google/yapf.git", + "upstream_zlib": "https://github.com/madler/zlib.git", + + # The version / instance id of the cipd:chromium/fuchsia/test-scripts which + # will be used altogether with fuchsia-sdk to setup the build / test + # environment. + 'fuchsia_test_scripts_version': '_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC', + + # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be + # used altogether with fuchsia-sdk to generate gn based build rules. + 'fuchsia_gn_sdk_version': 'tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC', +} + +gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" +gclient_gn_args = ["checkout_llvm"] + +# Only these hosts are allowed for dependencies in this DEPS file. +# If you need to add a new host, contact chrome infrastructure team. +allowed_hosts = [ + "boringssl.googlesource.com", + "chrome-infra-packages.appspot.com", + "chromium.googlesource.com", + "dart.googlesource.com", + "flutter.googlesource.com", + "llvm.googlesource.com", + "skia.googlesource.com", + "swiftshader.googlesource.com", +] + +deps = { + 'src': 'https://github.com/shorebirdtech/buildroot.git' + '@' + '4c5c8abd2ab1ac7c2c029503c71450a87bf94307', + + 'src/flutter/third_party/depot_tools': + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', + + 'src/flutter/third_party/rapidjson': + Var('flutter_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', + + 'src/flutter/third_party/harfbuzz': + Var('flutter_git') + '/third_party/harfbuzz' + '@' + 'ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2', + + 'src/flutter/third_party/libcxx': + Var('llvm_git') + '/llvm-project/libcxx' + '@' + '44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0', + + 'src/flutter/third_party/libcxxabi': + Var('llvm_git') + '/llvm-project/libcxxabi' + '@' + '2ce528fb5e0f92e57c97ec3ff53b75359d33af12', + + 'src/flutter/third_party/glfw': + Var('flutter_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', + + 'src/flutter/third_party/shaderc': + Var('chromium_git') + '/external/github.com/google/shaderc' + '@' + '37e25539ce199ecaf19fb7f7d27818716d36686d', + + 'src/flutter/third_party/vulkan-deps': + Var('chromium_git') + '/vulkan-deps' + '@' + '014f44e134a1de387791bffacc32ff9d8db71176', + + 'src/flutter/third_party/flatbuffers': + Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', + + 'src/flutter/third_party/icu': + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb', + + 'src/flutter/third_party/gtest-parallel': + Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', + + 'src/flutter/third_party/benchmark': + Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', + + 'src/flutter/third_party/googletest': + Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0', + + 'src/flutter/third_party/boringssl': + Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), + + 'src/flutter/third_party/yapf': + Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', + + 'src/flutter/third_party/boringssl/src': + 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'), + + 'src/flutter/third_party/perfetto': + Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'), + + 'src/flutter/third_party/protobuf': + Var('flutter_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'), + + # TODO(67373): These are temporarily checked in, but this dep can be restored + # once the buildmoot is completed. + # 'src/flutter/build/secondary/third_party/protobuf': + # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), + + 'src/flutter/third_party/dart': + Var('dart_sdk_git') + '@' + Var('dart_sdk_revision'), + + # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. + + 'src/flutter/third_party/dart/third_party/binaryen/src': + Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9', + + 'src/flutter/third_party/dart/third_party/devtools': + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056'}]}, + + 'src/flutter/third_party/dart/third_party/pkg/args': + Var('dart_git') + '/args.git@e623652744c82533829f2e62b1aba1a6cf06e291', + + 'src/flutter/third_party/dart/third_party/pkg/async': + Var('dart_git') + '/async.git@c0d81f8699682d01d657a9bf827107d11904a247', + + 'src/flutter/third_party/dart/third_party/pkg/bazel_worker': + Var('dart_git') + '/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac', + + 'src/flutter/third_party/dart/third_party/pkg/boolean_selector': + Var('dart_git') + '/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68', + + 'src/flutter/third_party/dart/third_party/pkg/browser_launcher': + Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/cli_util': + Var('dart_git') + '/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38', + + 'src/flutter/third_party/dart/third_party/pkg/clock': + Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/collection': + Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/convert': + Var('dart_git') + '/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a', + + 'src/flutter/third_party/dart/third_party/pkg/crypto': + Var('dart_git') + '/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57', + + 'src/flutter/third_party/dart/third_party/pkg/csslib': + Var('dart_git') + '/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249', + + 'src/flutter/third_party/dart/third_party/pkg/dart_style': + Var('dart_git') + '/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e', + + 'src/flutter/third_party/dart/third_party/pkg/dartdoc': + Var('dart_git') + '/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0', + + 'src/flutter/third_party/dart/third_party/pkg/file': + Var('dart_git') + '/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e', + + 'src/flutter/third_party/dart/third_party/pkg/fixnum': + Var('dart_git') + '/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0', + + 'src/flutter/third_party/dart/third_party/pkg/glob': + Var('dart_git') + '/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52', + + 'src/flutter/third_party/dart/third_party/pkg/html': + Var('dart_git') + '/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4', + + 'src/flutter/third_party/dart/third_party/pkg/http': + Var('dart_git') + '/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525', + + 'src/flutter/third_party/dart/third_party/pkg/http_multi_server': + Var('dart_git') + '/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0', + + 'src/flutter/third_party/dart/third_party/pkg/http_parser': + Var('dart_git') + '/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939', + + 'src/flutter/third_party/dart/third_party/pkg/intl': + Var('dart_git') + '/intl.git@5d65e3808ce40e6282e40881492607df4e35669f', + + 'src/flutter/third_party/dart/third_party/pkg/json_rpc_2': + Var('dart_git') + '/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce', + + 'src/flutter/third_party/dart/third_party/pkg/leak_tracker': + Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c', + + 'src/flutter/third_party/dart/third_party/pkg/logging': + Var('dart_git') + '/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e', + + 'src/flutter/third_party/dart/third_party/pkg/markdown': + Var('dart_git') + '/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40', + + 'src/flutter/third_party/dart/third_party/pkg/matcher': + Var('dart_git') + '/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c', + + 'src/flutter/third_party/dart/third_party/pkg/mockito': + Var('dart_git') + '/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab', + + 'src/flutter/third_party/dart/third_party/pkg/native': + Var('dart_git') + '/native.git@659511886501bcce638c3966590df04984909ef0', + + 'src/flutter/third_party/dart/third_party/pkg/package_config': + Var('dart_git') + '/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6', + + 'src/flutter/third_party/dart/third_party/pkg/path': + Var('dart_git') + '/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805', + + 'src/flutter/third_party/dart/third_party/pkg/pool': + Var('dart_git') + '/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a', + + 'src/flutter/third_party/dart/third_party/pkg/protobuf': + Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/pub': + Var('dart_git') + '/pub.git' + '@' + Var('dart_pub_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/pub_semver': + Var('dart_git') + '/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02', + + 'src/flutter/third_party/dart/third_party/pkg/shelf': + Var('dart_git') + '/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36', + + 'src/flutter/third_party/dart/third_party/pkg/source_maps': + Var('dart_git') + '/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8', + + 'src/flutter/third_party/dart/third_party/pkg/source_span': + Var('dart_git') + '/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550', + + 'src/flutter/third_party/dart/third_party/pkg/sse': + Var('dart_git') + '/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79', + + 'src/flutter/third_party/dart/third_party/pkg/stack_trace': + Var('dart_git') + '/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525', + + 'src/flutter/third_party/dart/third_party/pkg/stream_channel': + Var('dart_git') + '/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825', + + 'src/flutter/third_party/dart/third_party/pkg/string_scanner': + Var('dart_git') + '/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01', + + 'src/flutter/third_party/dart/third_party/pkg/tar': + Var('dart_git') + '/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291', + + 'src/flutter/third_party/dart/third_party/pkg/term_glyph': + Var('dart_git') + '/term_glyph.git@19d8c08a4e81122639129c62049896021910c932', + + 'src/flutter/third_party/dart/third_party/pkg/test': + Var('dart_git') + '/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b', + + 'src/flutter/third_party/dart/third_party/pkg/test_reflective_loader': + Var('dart_git') + '/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078', + + 'src/flutter/third_party/dart/third_party/pkg/tools': + Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/typed_data': + Var('dart_git') + '/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945', + + 'src/flutter/third_party/dart/third_party/pkg/watcher': + Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/web': + Var('dart_git') + '/web.git' + '@' + Var('dart_web_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/web_socket_channel': + Var('dart_git') + '/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6', + + 'src/flutter/third_party/dart/third_party/pkg/webdev': + Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol': + Var('dart_git') + '/external/github.com/google/webkit_inspection_protocol.dart.git' + '@' + Var('dart_webkit_inspection_protocol_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/yaml': + Var('dart_git') + '/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15', + + 'src/flutter/third_party/dart/third_party/pkg/yaml_edit': + Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), + + 'src/flutter/third_party/dart/tools/sdks/dart-sdk': + {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'git_revision:7e6469bd51d404916395a47b011d907d2c905121'}]}, + + # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. + + # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout + 'src/flutter/prebuilts/linux-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/linux-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_dart_sdk' + }, + 'src/flutter/prebuilts/linux-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/linux-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_dart_sdk' + }, + 'src/flutter/prebuilts/macos-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/mac-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_dart_sdk' + }, + 'src/flutter/prebuilts/macos-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/mac-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_dart_sdk' + }, + 'src/flutter/prebuilts/windows-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/windows-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_dart_sdk' + }, + 'src/flutter/prebuilts/windows-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/windows-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_dart_sdk' + }, + + # esbuild download + 'src/flutter/prebuilts/linux-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/linux-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_esbuild' + }, + 'src/flutter/prebuilts/macos-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/mac-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_esbuild' + }, + 'src/flutter/prebuilts/macos-arm64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/mac-arm64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_esbuild' + }, + 'src/flutter/prebuilts/windows-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/windows-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_esbuild' + }, + + 'src/flutter/third_party/expat': + Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + '654d2de0da85662fcc7644a7acd7c2dd2cfb21f0', + + 'src/flutter/third_party/freetype2': + Var('flutter_git') + '/third_party/freetype2' + '@' + 'bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a', + + 'src/flutter/third_party/skia': + Var('skia_git') + '/skia.git' + '@' + Var('skia_revision'), + + 'src/flutter/third_party/ocmock': + Var('flutter_git') + '/third_party/ocmock' + '@' + Var('ocmock_rev'), + + 'src/third_party/updater': + Var('updater_git') + '@' + Var('updater_rev'), + + 'src/flutter/third_party/libjpeg-turbo/src': + Var('flutter_git') + '/third_party/libjpeg-turbo' + '@' + '0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f', + + 'src/flutter/third_party/libpng': + Var('flutter_git') + '/third_party/libpng' + '@' + 'de36b892e921c684ef718fec24739ae9bb49c977', + + 'src/flutter/third_party/libwebp': + Var('chromium_git') + '/webm/libwebp.git' + '@' + 'ca332209cb5567c9b249c86788cb2dbf8847e760', # 1.3.2 + + 'src/flutter/third_party/wuffs': + Var('skia_git') + '/external/github.com/google/wuffs-mirror-release-c.git' + '@' + '600cd96cf47788ee3a74b40a6028b035c9fd6a61', + + 'src/flutter/third_party/zlib': + Var('chromium_git') + '/chromium/src/third_party/zlib.git' + '@' + '7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df', + + 'src/flutter/third_party/cpu_features/src': + Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', + + 'src/flutter/third_party/inja': + Var('flutter_git') + '/third_party/inja' + '@' + '88bd6112575a80d004e551c98cf956f88ff4d445', + + 'src/flutter/third_party/libtess2': + Var('flutter_git') + '/third_party/libtess2' + '@' + '725e5e08ec8751477565f1d603fd7eb9058c277c', + + 'src/flutter/third_party/sqlite': + Var('flutter_git') + '/third_party/sqlite' + '@' + '0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c', + + 'src/flutter/third_party/pyyaml': + Var('flutter_git') + '/third_party/pyyaml.git' + '@' + '03c67afd452cdff45b41bfe65e19a2fb5b80a0e8', + + 'src/flutter/third_party/swiftshader': + Var('swiftshader_git') + '/SwiftShader.git' + '@' + '2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f', + + 'src/flutter/third_party/angle': + Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', + + 'src/flutter/third_party/vulkan_memory_allocator': + Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6', + + 'src/flutter/third_party/abseil-cpp': + Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + 'ff6504dc527b25fef0f3c531e7dba0ed6b69c162', + + # Dart packages + 'src/flutter/third_party/pkg/archive': + Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + 'f1d164f8f5d8aea0be620a9b1e8d300b75a29388', # 3.6.1 + + 'src/flutter/third_party/pkg/coverage': + Var('flutter_git') + '/third_party/coverage.git' + '@' + 'bb0ab721ee4ceef1abfa413d8d6fd46013b583b9', # 1.7.2 + + 'src/flutter/third_party/pkg/equatable': + Var('flutter_git') + '/third_party/equatable.git' + '@' + '2117551ff3054f8edb1a58f63ffe1832a8d25623', # 2.0.5 + + 'src/flutter/third_party/pkg/flutter_packages': + Var('flutter_git') + '/mirrors/packages' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various + + 'src/flutter/third_party/pkg/gcloud': + Var('flutter_git') + '/third_party/gcloud.git' + '@' + 'a5276b85c4714378e84b1fb478b8feeeb686ac26', # 0.8.6-dev + + 'src/flutter/third_party/pkg/googleapis': + Var('flutter_git') + '/third_party/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various + + 'src/flutter/third_party/pkg/io': + Var('flutter_git') + '/third_party/io.git' + '@' + '997a6243aad20af4238147d9ec00bf638b9169af', # 1.0.5-wip + + 'src/flutter/third_party/pkg/node_preamble': + Var('flutter_git') + '/third_party/node_preamble.dart.git' + '@' + '47245865175929ec452d8058e563c267b64c3d64', # 2.0.2 + + 'src/flutter/third_party/pkg/platform': + Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 + + 'src/flutter/third_party/pkg/process': + Var('dart_git') + '/process.dart' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 + + 'src/flutter/third_party/pkg/process_runner': + Var('flutter_git') + '/third_party/process_runner.git' + '@' + 'f24c69efdcaf109168f23d381fa281453d2bc9b1', # 4.1.2 + + 'src/flutter/third_party/pkg/vector_math': + Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 + + 'src/flutter/third_party/imgui': + Var('flutter_git') + '/third_party/imgui.git' + '@' + '3ea0fad204e994d669f79ed29dcaf61cd5cb571d', + + 'src/flutter/third_party/json': + Var('flutter_git') + '/third_party/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642', + + 'src/flutter/third_party/stb': + Var('flutter_git') + '/third_party/stb.git' + '@' + '5736b15f7ea0ffb08dd38af21067c314d6a3aae9', + + 'src/flutter/third_party/gradle': { + 'packages': [ + { + # See tools/gradle/README.md for update instructions. + # Version here means the CIPD tag. + 'version': 'version:8.9', + 'package': 'flutter/gradle' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd' + }, + + 'src/flutter/third_party/android_tools/trace_to_text': { + 'packages': [ + { + # 25.0 downloads for both mac-amd64 and mac-arm64 + # 26.1 is not found with either platform + # 27.1 is the latest release of perfetto + 'version': 'git_tag:v25.0', + 'package': 'perfetto/trace_to_text/${{platform}}' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd' + }, + + 'src/flutter/third_party/android_tools/google-java-format': { + 'packages': [ + { + 'package': 'flutter/android/google-java-format', + 'version': 'version:1.7-1' + } + ], + # We want to be able to format these as part of CI, and the CI step that + # checks formatting runs without downloading the rest of the Android build + # tooling. Therefore unlike all the other Android-related tools, we want to + # download this every time. + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/android_tools': { + 'packages': [ + { + 'package': 'flutter/android/sdk/all/${{platform}}', + 'version': 'version:35v1' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/android_embedding_dependencies': { + 'packages': [ + { + 'package': 'flutter/android/embedding_bundle', + 'version': 'last_updated:2024-09-10T16:32:16-0700' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/java/openjdk': { + 'packages': [ + { + 'package': 'flutter/java/openjdk/${{platform}}', + 'version': 'version:17' + } + ], + # Always download the JDK since java is required for running the formatter. + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/gn': { + 'packages': [ + { + 'package': 'gn/gn/${{platform}}', + 'version': 'git_revision:b79031308cc878488202beb99883ec1f2efd9a6d' + }, + ], + 'dep_type': 'cipd', + }, + 'src/flutter/third_party/ninja': { + 'packages': [ + { + 'package': 'infra/3pp/tools/ninja/${{platform}}', + 'version': 'version:2@1.11.1.chromium.4', + } + ], + 'dep_type': 'cipd', + }, + + 'src/flutter/prebuilts/emsdk': { + 'url': Var('skia_git') + '/external/github.com/emscripten-core/emsdk.git' + '@' + 'a896e3d066448b3530dbcaa48869fafefd738f57', + 'condition': 'download_emsdk', + }, + + # Clang on mac and linux are expected to typically be the same revision. + # They are separated out so that the autoroller can more easily manage them. + 'src/flutter/buildtools/mac-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/mac-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/mac-arm64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/linux-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/linux-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "linux" or host_os == "mac"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/linux-arm64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/linux-arm64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "linux" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/windows-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/windows-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'download_windows_deps', + 'dep_type': 'cipd', + }, + + # RBE binaries and configs. + 'src/flutter/buildtools/linux-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/windows-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and download_windows_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/build/rbe': { + 'packages': [ + { + 'package': 'flutter_internal/rbe/reclient_cfgs', + 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', + } + ], + 'condition': 'use_rbe', + 'dep_type': 'cipd', + }, + + # gcloud + 'src/flutter/buildtools/linux-x64/gcloud': { + 'packages': [ + { + 'package': 'infra/3pp/tools/gcloud/${{platform}}', + 'version': Var('gcloud_version'), + } + ], + 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/gcloud': { + 'packages': [ + { + 'package': 'infra/3pp/tools/gcloud/${{platform}}', + 'version': Var('gcloud_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag + # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag + 'src/fuchsia/sdk/linux': { + 'packages': [ + { + 'package': 'fuchsia/sdk/core/linux-amd64', + 'version': 'xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC' + } + ], + 'condition': 'download_fuchsia_deps and not download_fuchsia_sdk', + 'dep_type': 'cipd', + }, + + 'src/flutter/tools/fuchsia/test_scripts': { + 'packages': [ + { + 'package': 'chromium/fuchsia/test-scripts', + 'version': Var('fuchsia_test_scripts_version'), + } + ], + 'condition': 'download_fuchsia_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/tools/fuchsia/gn-sdk': { + 'packages': [ + { + 'package': 'chromium/fuchsia/gn-sdk', + 'version': Var('fuchsia_gn_sdk_version'), + } + ], + 'condition': 'download_fuchsia_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/impeller-cmake-example': { + 'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + '9f8298ec31dcbebbf019bd487888166abf2f55e6', + 'condition': 'download_impeller_cmake_example', + }, + + # cmake is only used by impeller-cmake-example. + 'src/flutter/buildtools/mac-x64/cmake': { + 'packages': [ + { + 'package': 'infra/3pp/tools/cmake/mac-amd64', + 'version': 'CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC', + } + ], + 'condition': 'download_impeller_cmake_example and host_os == "mac"', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/google_fonts_for_unit_tests': { + 'packages': [ + { + 'package': 'flutter/flutter_font_fallbacks', + 'version': 'c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea' + } + ], + 'dep_type': 'cipd', + } +} + +recursedeps = [ + "src/flutter/third_party/vulkan-deps", +] + +hooks = [ + { + # Generate the Dart SDK's .dart_tool/package_confg.json file. + "name": "Generate .dart_tool/package_confg.json", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_package_config.py", + ], + }, + { + # Generate the sdk/version file. + "name": "Generate sdk/version", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_sdk_version_file.py", + ], + }, + { + # Update the Windows toolchain if necessary. + "name": "win_toolchain", + "condition": "download_windows_deps", + "pattern": ".", + "action": ["python3", "src/build/vs_toolchain.py", "update"], + }, + { + "name": "dia_dll", + "pattern": ".", + "condition": "download_windows_deps", + "action": [ + "python3", + "src/flutter/tools/dia_dll.py", + ], + }, + { + "name": "linux_sysroot_x64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=x64", + ], + }, + { + "name": "linux_sysroot_arm64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=arm64", + ], + }, + { + "name": "pub get --offline", + "pattern": ".", + "action": [ + "python3", + "src/flutter/tools/pub_get_offline.py", + ], + }, + { + "name": "Download Fuchsia SDK", + "pattern": ".", + "condition": "download_fuchsia_deps and download_fuchsia_sdk", + "action": [ + "python3", + "src/flutter/tools/download_fuchsia_sdk.py", + "--fail-loudly", + "--verbose", + "--host-os", + Var("host_os"), + "--fuchsia-sdk-path", + Var("fuchsia_sdk_path"), + ], + }, + { + "name": "Activate Emscripten SDK", + "pattern": ".", + "condition": "download_emsdk", + "action": [ + "python3", + "src/flutter/tools/activate_emsdk.py", + ], + }, + { + "name": "Setup githooks", + "pattern": ".", + "condition": "setup_githooks", + "action": [ + "python3", + "src/flutter/tools/githooks/setup.py", + ], + }, + { + "name": "impeller-cmake-example submodules", + "pattern": ".", + "condition": "download_impeller_cmake_example", + "action": [ + "python3", + "src/flutter/ci/impeller_cmake_build_test.py", + "--path", + "flutter/third_party/impeller-cmake-example", + "--setup", + ], + }, + { + "name": "Download Fuchsia system images", + "pattern": ".", + "condition": "run_fuchsia_emu", + "action": [ + "env", + "DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}", + "FUCHSIA_SDK_PATH={fuchsia_sdk_path}", + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py", + "terminal.x64,terminal.qemu-arm64", + ], + }, + # The following two scripts check if they are running in the LUCI + # environment, and do nothing if so. This is because Xcode is not yet + # installed in CI when these hooks are run. + { + "name": "Find the iOS device SDKs", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/config/ios/ios_sdk.py", + # This cleans up entries under flutter/prebuilts for this script and the + # following script. + "--as-gclient-hook", + ], + }, + { + "name": "Find the macOS SDK", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/mac/find_sdk.py", + "--as-gclient-hook", + Var("mac_sdk_min"), + ], + }, + { + "name": "Generate Fuchsia GN build rules", + "pattern": ".", + "condition": "download_fuchsia_deps", + "action": [ + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py", + ], + }, +] \ No newline at end of file From d4a61affffbceb2d5f339c58a1a308f09bd44753 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 16:14:31 -0500 Subject: [PATCH 24/50] Use correct local appdata path --- shell/common/shell.cc | 2 +- .../windows/flutter_windows_engine.cc | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 8ba5817ed5f35..ffb2e6a32fc25 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -444,7 +444,7 @@ Shell::Shell(DartVMRef vm, weak_factory_gpu_(nullptr), weak_factory_(this) { // FIXME: This is probably the wrong place to hook into. -#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX || FML_OS_WINDOWS +#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX || FML_OS_WIN if (!vm_) { shorebird_report_launch_failure(); } else { diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index ab62c9441ced3..02f19b5c58323 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -8,7 +8,9 @@ #include #include +#include #include +#include #include "flutter/fml/logging.h" #include "flutter/fml/paths.h" @@ -323,6 +325,22 @@ int GetBuildNumber() { return -1; } +std::string GetLocalAppDataPath() { + PWSTR path = nullptr; + HRESULT result = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &path); + if (SUCCEEDED(result)) { + std::wstring widePath(path); + std::string localAppDataPath(widePath.begin(), widePath.end()); + // The calling process is responsible for freeing this resource + // https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath + CoTaskMemFree(path); + return localAppDataPath; + } else { + FML_LOG(ERROR) << "Failed to retrieve the local AppData directory."; + return ""; + } +} + bool FlutterWindowsEngine::Run(std::string_view entrypoint) { if (!project_->HasValidPaths()) { FML_LOG(ERROR) << "Missing or unresolvable paths to assets."; @@ -335,7 +353,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { std::string* shorebird_yaml_contents = new std::string(); if (filesystem::ReadFileToString(shorebird_yaml_path, shorebird_yaml_contents)) { - auto code_cache_path = R"(C:\Users\bryan\AppData\Local\shorebird)"; + auto code_cache_path = GetLocalAppDataPath(); auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); From a3313bd92430fb72811bb6116b81b7746ce02ccc Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 16:15:05 -0500 Subject: [PATCH 25/50] Formatting --- shell/platform/windows/flutter_windows_engine.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 02f19b5c58323..637b77cd8f9b6 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -5,12 +5,12 @@ #include "flutter/shell/platform/windows/flutter_windows_engine.h" #include +#include +#include #include #include -#include #include -#include #include "flutter/fml/logging.h" #include "flutter/fml/paths.h" From 4e4ac4168f2f96f5527c061a62d26b15287bc424 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 17:01:08 -0500 Subject: [PATCH 26/50] consolidate fetching build number and release version --- .../windows/flutter_windows_engine.cc | 56 ++++--------------- 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 637b77cd8f9b6..f1531cae1c749 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -244,27 +244,25 @@ bool FlutterWindowsEngine::Run() { return Run(""); } -// FIXME: This and the following function were generated by copilot. They work, -// but that's about all you can say for them. -std::string GetReleaseVersion() { +std::pair GetReleaseVersionAndBuildNumber() { char modulePath[MAX_PATH]; // Get the full path of the currently running executable if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return "Error retrieving module file name."; + return {"Error retrieving module file name.", -1}; } // Get the size of the version information DWORD handle = -1; DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); if (versionInfoSize == -1) { - return "Error retrieving version info size."; + return {"Error retrieving version info size.", -1}; } // Allocate memory for version info std::vector versionData(versionInfoSize); if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, versionData.data())) { - return "Error retrieving version info."; + return {"Error retrieving version info.", -1}; } // Get the version info structure @@ -272,7 +270,7 @@ std::string GetReleaseVersion() { UINT fileInfoSize = -1; if (!VerQueryValueA(versionData.data(), "\\", reinterpret_cast(&fileInfo), &fileInfoSize)) { - return "Error querying version info."; + return {"Error querying version info.", -1}; } if (fileInfo) { @@ -283,46 +281,10 @@ std::string GetReleaseVersion() { char version[49]; snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); - return std::string(version); + return {std::string(version), LOWORD(fileInfo->dwFileVersionLS)}; } - return "No version information available."; -} - -int GetBuildNumber() { - char modulePath[MAX_PATH]; - // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return -1; - } - - // Get the size of the version information - DWORD handle = -1; - DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) { - return -1; - } - - // Allocate memory for version info - std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, - versionData.data())) { - return -1; - } - - // Get the version info structure - VS_FIXEDFILEINFO* fileInfo = nullptr; - UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", - reinterpret_cast(&fileInfo), &fileInfoSize)) { - return -1; - } - - if (fileInfo) { - return LOWORD(fileInfo->dwFileVersionLS); - } - - return -1; + return {"No version information available.", -1}; } std::string GetLocalAppDataPath() { @@ -357,9 +319,11 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); + auto [release_version, build_number] = GetReleaseVersionAndBuildNumber(); + flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( code_cache_path, code_cache_path, app_path, *shorebird_yaml_contents, - GetReleaseVersion(), std::to_string(GetBuildNumber())); + release_version, std::to_string(build_number)); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From b93aeb14523f9af655e65b986b50318c0d7fb426 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Mon, 30 Dec 2024 17:16:01 -0500 Subject: [PATCH 27/50] format --- shell/platform/windows/flutter_windows_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index f1531cae1c749..dc9042c3c9ae6 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -320,7 +320,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); auto [release_version, build_number] = GetReleaseVersionAndBuildNumber(); - + flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( code_cache_path, code_cache_path, app_path, *shorebird_yaml_contents, release_version, std::to_string(build_number)); From 5852885cea714e3edfb6ec999df336b7b1764399 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 13:54:52 -0500 Subject: [PATCH 28/50] remove unnecessary pointer --- shell/platform/windows/flutter_windows_engine.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index dc9042c3c9ae6..fb76dcbb14c91 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -312,9 +312,9 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { std::string icu_path_string = project_->icu_path().u8string(); auto shorebird_yaml_path = fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); - std::string* shorebird_yaml_contents = new std::string(); + auto shorebird_yaml_contents = std::string(""); if (filesystem::ReadFileToString(shorebird_yaml_path, - shorebird_yaml_contents)) { + &shorebird_yaml_contents)) { auto code_cache_path = GetLocalAppDataPath(); auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = @@ -322,7 +322,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto [release_version, build_number] = GetReleaseVersionAndBuildNumber(); flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( - code_cache_path, code_cache_path, app_path, *shorebird_yaml_contents, + code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, release_version, std::to_string(build_number)); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { From 48e61d82be10f0b09305ffc1e8eb6e5ecb6ec868 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:13:27 -0500 Subject: [PATCH 29/50] Introduce ReleaseVersion struct --- shell/common/shorebird/shorebird.cc | 2 +- shell/common/shorebird/shorebird.h | 18 +++--- .../windows/flutter_windows_engine.cc | 57 +++++++++++-------- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index c65640ea876fd..723ea23e01003 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -109,7 +109,7 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { AppParameters app_parameters; // Combine version and version_code into a single string. // We could also pass these separately through to the updater if needed. - auto release_version = args.version + "+" + args.version_code; + auto release_version = args.release_version.version + "+" + args.release_version.build_number; app_parameters.release_version = release_version.c_str(); app_parameters.code_cache_dir = code_cache_dir.c_str(); app_parameters.app_storage_dir = app_storage_dir.c_str(); diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index 61f73f6f9a7c4..9fadee6351894 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -6,26 +6,28 @@ namespace flutter { +struct ReleaseVersion { + std::string version; + std::string build_number; +}; + struct ShorebirdConfigArgs { std::string code_cache_path; std::string app_storage_path; std::string release_app_library_path; - const std::string& shorebird_yaml; - const std::string& version; - const std::string& version_code; + std::string shorebird_yaml; + ReleaseVersion release_version; ShorebirdConfigArgs(std::string code_cache_path, std::string app_storage_path, std::string release_app_library_path, - const std::string& shorebird_yaml, - const std::string& version, - const std::string& version_code) + std::string shorebird_yaml, + ReleaseVersion release_version) : code_cache_path(code_cache_path), app_storage_path(app_storage_path), release_app_library_path(release_app_library_path), shorebird_yaml(shorebird_yaml), - version(version), - version_code(version_code) {} + release_version(release_version) {} }; std::string ConfigureShorebird(const ShorebirdConfigArgs& args); diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index fb76dcbb14c91..42feb1680518a 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -244,47 +244,52 @@ bool FlutterWindowsEngine::Run() { return Run(""); } -std::pair GetReleaseVersionAndBuildNumber() { - char modulePath[MAX_PATH]; +int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { + char module_path[MAX_PATH]; // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, modulePath, MAX_PATH) == -1) { - return {"Error retrieving module file name.", -1}; + if (GetModuleFileNameA(NULL, module_path, MAX_PATH) == -1) { + return -1; } // Get the size of the version information DWORD handle = -1; - DWORD versionInfoSize = GetFileVersionInfoSizeA(modulePath, &handle); - if (versionInfoSize == -1) { - return {"Error retrieving version info size.", -1}; + DWORD version_info_size = GetFileVersionInfoSizeA(module_path, &handle); + if (version_info_size == -1) { + return -1; } // Allocate memory for version info - std::vector versionData(versionInfoSize); - if (!GetFileVersionInfoA(modulePath, handle, versionInfoSize, - versionData.data())) { - return {"Error retrieving version info.", -1}; + std::vector version_data(version_info_size); + if (!GetFileVersionInfoA(module_path, handle, version_info_size, + version_data.data())) { + return -1; } // Get the version info structure - VS_FIXEDFILEINFO* fileInfo = nullptr; - UINT fileInfoSize = -1; - if (!VerQueryValueA(versionData.data(), "\\", - reinterpret_cast(&fileInfo), &fileInfoSize)) { - return {"Error querying version info.", -1}; + VS_FIXEDFILEINFO* file_info = nullptr; + UINT file_info_size = -1; + if (!VerQueryValueA(version_data.data(), "\\", + reinterpret_cast(&file_info), &file_info_size)) { + + return -1; } - if (fileInfo) { + if (file_info) { // Extract version numbers - DWORD major = HIWORD(fileInfo->dwFileVersionMS); - DWORD minor = LOWORD(fileInfo->dwFileVersionMS); - DWORD build = HIWORD(fileInfo->dwFileVersionLS); + DWORD major = HIWORD(file_info->dwFileVersionMS); + DWORD minor = LOWORD(file_info->dwFileVersionMS); + DWORD build = HIWORD(file_info->dwFileVersionLS); char version[49]; snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); - return {std::string(version), LOWORD(fileInfo->dwFileVersionLS)}; + release_version->version = std::string(version); + release_version->build_number = std::to_string(LOWORD(file_info->dwFileVersionLS)); + FML_LOG(ERROR) << "Version: " << release_version->version + << " Build: " << release_version->build_number; + return kSuccess; } - return {"No version information available.", -1}; + return -1; } std::string GetLocalAppDataPath() { @@ -319,11 +324,15 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); - auto [release_version, build_number] = GetReleaseVersionAndBuildNumber(); + ReleaseVersion release_version; + auto release_version_result = GetReleaseVersionAndBuildNumber(&release_version); + if (release_version_result != kSuccess) { + FML_LOG(ERROR) << "Failed to retrieve the release version and build number."; + } flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, - release_version, std::to_string(build_number)); + release_version); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From 6f1a6b5efa386b7aefdc529603124fcfec7adb3d Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:15:02 -0500 Subject: [PATCH 30/50] formatting --- shell/common/shorebird/shorebird.cc | 3 ++- shell/platform/windows/flutter_windows_engine.cc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 723ea23e01003..a41b22db14f22 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -109,7 +109,8 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { AppParameters app_parameters; // Combine version and version_code into a single string. // We could also pass these separately through to the updater if needed. - auto release_version = args.release_version.version + "+" + args.release_version.build_number; + auto release_version = + args.release_version.version + "+" + args.release_version.build_number; app_parameters.release_version = release_version.c_str(); app_parameters.code_cache_dir = code_cache_dir.c_str(); app_parameters.app_storage_dir = app_storage_dir.c_str(); diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 42feb1680518a..5aad0d0bf2678 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -270,7 +270,6 @@ int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { UINT file_info_size = -1; if (!VerQueryValueA(version_data.data(), "\\", reinterpret_cast(&file_info), &file_info_size)) { - return -1; } @@ -283,9 +282,8 @@ int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { char version[49]; snprintf(version, sizeof(version), "%lu.%lu.%lu", major, minor, build); release_version->version = std::string(version); - release_version->build_number = std::to_string(LOWORD(file_info->dwFileVersionLS)); - FML_LOG(ERROR) << "Version: " << release_version->version - << " Build: " << release_version->build_number; + release_version->build_number = + std::to_string(LOWORD(file_info->dwFileVersionLS)); return kSuccess; } @@ -325,14 +323,16 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); ReleaseVersion release_version; - auto release_version_result = GetReleaseVersionAndBuildNumber(&release_version); + auto release_version_result = + GetReleaseVersionAndBuildNumber(&release_version); if (release_version_result != kSuccess) { - FML_LOG(ERROR) << "Failed to retrieve the release version and build number."; + FML_LOG(ERROR) + << "Failed to retrieve the release version and build number."; } flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( - code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, - release_version); + code_cache_path, code_cache_path, app_path, + shorebird_yaml_contents, release_version); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From a9e4fb20c744b2a90ae2f3afa1610cebf4f377eb Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:15:35 -0500 Subject: [PATCH 31/50] Formatting --- shell/platform/windows/flutter_windows_engine.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 5aad0d0bf2678..34977342ad890 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -330,9 +330,9 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { << "Failed to retrieve the release version and build number."; } - flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs( - code_cache_path, code_cache_path, app_path, - shorebird_yaml_contents, release_version); + flutter::ShorebirdConfigArgs shorebird_args = + flutter::ShorebirdConfigArgs(code_cache_path, code_cache_path, app_path, + shorebird_yaml_contents, release_version); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From 28b07d7312b630e36fdde6cbbca2ba0a76d8acf4 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:20:03 -0500 Subject: [PATCH 32/50] More formatting --- shell/platform/windows/flutter_windows_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 34977342ad890..4d1c86e8a064a 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -332,7 +332,7 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs(code_cache_path, code_cache_path, app_path, - shorebird_yaml_contents, release_version); + shorebird_yaml_contents, release_version); auto patch_path = flutter::ConfigureShorebird(shorebird_args); if (!patch_path.empty()) { // If we have a patch installed, we replace the default AOT library path From ef0091d9e90cc8be669b3dc578477790069157ca Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:22:14 -0500 Subject: [PATCH 33/50] Comments --- shell/common/shorebird/shorebird.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index a41b22db14f22..dff56a28e4731 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -79,6 +79,7 @@ FileCallbacks ShorebirdFileCallbacks() { }; } +// FIXME: consolidate this with the other ConfigureShorebird std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { FML_LOG(INFO) << "In ConfigureShorebird"; // FIXME: This was commented out because the windows flutter engine does not @@ -141,9 +142,10 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { // https://github.com/shorebirdtech/shorebird/issues/950 // We only set the base snapshot on iOS for now. -#if FML_OS_IOS || FML_OS_MACOSX - SetBaseSnapshot(settings); -#endif + // TODO: this won't compile as we don't have a settings object here. +// #if FML_OS_IOS || FML_OS_MACOSX +// SetBaseSnapshot(settings); +// #endif FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); From 4f2351ac2be0f922c7bf3f1a325db4af5dce00b7 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:22:44 -0500 Subject: [PATCH 34/50] Formatting --- shell/common/shorebird/shorebird.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index dff56a28e4731..efb3ae2a63521 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -143,9 +143,9 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { // We only set the base snapshot on iOS for now. // TODO: this won't compile as we don't have a settings object here. -// #if FML_OS_IOS || FML_OS_MACOSX -// SetBaseSnapshot(settings); -// #endif + // #if FML_OS_IOS || FML_OS_MACOSX + // SetBaseSnapshot(settings); + // #endif FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); From ec8c64498f753b70a2e04bced286bd18d78cd28e Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:25:32 -0500 Subject: [PATCH 35/50] More comments --- shell/platform/embedder/embedder.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 35836436a63d7..cf55efe073841 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -2310,11 +2310,16 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, "Could not infer the Flutter project to run from given arguments."); } + // FIXME: This is probably the wrong place to call ConfigureShorebird, as + // some platforms (i.e., Windows) need to to swap out the app path before + // this point. // Begin shorebird + #if FML_OS_MACOSX if (args->shorebird_args.shorebird_yaml_contents) { settings.application_library_path.push_back(args->shorebird_args.app_path); flutter::ConfigureShorebird(args->shorebird_args, settings); } + #endif // End shorebird // Create the engine but don't launch the shell or run the root isolate. From c0e4596f34c794ef0f83863bbe671a799dfc33db Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:25:53 -0500 Subject: [PATCH 36/50] Formatting --- shell/platform/embedder/embedder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index cf55efe073841..e1a6b1f479afb 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -2314,12 +2314,12 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, // some platforms (i.e., Windows) need to to swap out the app path before // this point. // Begin shorebird - #if FML_OS_MACOSX +#if FML_OS_MACOSX if (args->shorebird_args.shorebird_yaml_contents) { settings.application_library_path.push_back(args->shorebird_args.app_path); flutter::ConfigureShorebird(args->shorebird_args, settings); } - #endif +#endif // End shorebird // Create the engine but don't launch the shell or run the root isolate. From ee1410eca4ef0718f5d72f16d8bdb2d0d00b333c Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:28:25 -0500 Subject: [PATCH 37/50] Remove print statements --- shell/common/shorebird/shorebird.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index efb3ae2a63521..6519271c59154 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -81,7 +81,6 @@ FileCallbacks ShorebirdFileCallbacks() { // FIXME: consolidate this with the other ConfigureShorebird std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { - FML_LOG(INFO) << "In ConfigureShorebird"; // FIXME: This was commented out because the windows flutter engine does not // populate the settings snapshots. Ideally we would call // ConfigureShorebird from the embedder and this would be uncommented. @@ -106,7 +105,6 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { bool init_result; // Using a block to make AppParameters lifetime explicit. { - FML_LOG(INFO) << "Constructing app parameters"; AppParameters app_parameters; // Combine version and version_code into a single string. // We could also pass these separately through to the updater if needed. @@ -128,11 +126,9 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { app_parameters.original_libapp_paths = c_paths.data(); app_parameters.original_libapp_paths_size = c_paths.size(); - FML_LOG(INFO) << "Calling shorebird_init"; // shorebird_init copies from app_parameters and shorebirdYaml. init_result = shorebird_init(&app_parameters, ShorebirdFileCallbacks(), args.shorebird_yaml.c_str()); - FML_LOG(INFO) << "init_result: " << init_result; } // We've decided not to support synchronous updates on launch for now. @@ -151,7 +147,6 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { char* c_active_path = shorebird_next_boot_patch_path(); std::string active_path = ""; if (c_active_path != NULL) { - FML_LOG(INFO) << "Found active patch!"; active_path = c_active_path; shorebird_free_string(c_active_path); FML_LOG(INFO) << "Shorebird updater: patch path: " << active_path; @@ -176,9 +171,7 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { // Once start_update_thread is called, the next_boot_patch* functions may // change their return values if the shorebird_report_launch_failed // function is called. - FML_LOG(INFO) << "Reporting launch start"; shorebird_report_launch_start(); - FML_LOG(INFO) << "Reported launch start"; if (shorebird_should_auto_update()) { FML_LOG(INFO) << "Starting Shorebird update"; From 753d3f9bb3296ff728fb833370714970a19d0767 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:30:24 -0500 Subject: [PATCH 38/50] Remove comments --- shell/platform/embedder/embedder.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index e1a6b1f479afb..f1646d85eab08 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -1972,7 +1972,6 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, flutter::Settings settings = flutter::SettingsFromCommandLine(command_line); - // First access of args aot_data if (SAFE_ACCESS(args, aot_data, nullptr)) { if (SAFE_ACCESS(args, vm_snapshot_data, nullptr) || SAFE_ACCESS(args, vm_snapshot_instructions, nullptr) || @@ -1986,9 +1985,6 @@ FlutterEngineResult FlutterEngineInitialize(size_t version, } if (flutter::DartVM::IsRunningPrecompiledCode()) { - // WIN: We need to get aot_data into args before here - // AOT data is loaded from the snapshot in - // shell\platform\windows\flutter_project_bundle.cc PopulateAOTSnapshotMappingCallbacks(args, settings); } else { PopulateJITSnapshotMappingCallbacks(args, settings); From 181035caa599f54e054efaf7dd8f8a2ec11285e2 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:37:08 -0500 Subject: [PATCH 39/50] Use in-out param for ConfigureShorebird --- shell/common/shorebird/shorebird.cc | 12 +++++++----- shell/common/shorebird/shorebird.h | 3 ++- shell/platform/windows/flutter_windows_engine.cc | 7 +++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 6519271c59154..498d0dfb19d7b 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -21,6 +21,7 @@ #include "flutter/shell/common/shorebird/snapshots_data_handle.h" #include "flutter/shell/common/switches.h" #include "fml/logging.h" +#include "shell/platform/embedder/embedder.h" #include "third_party/dart/runtime/include/dart_tools_api.h" #include "third_party/updater/library/include/updater.h" @@ -80,7 +81,8 @@ FileCallbacks ShorebirdFileCallbacks() { } // FIXME: consolidate this with the other ConfigureShorebird -std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { +bool ConfigureShorebird(const ShorebirdConfigArgs& args, + std::string* patch_path) { // FIXME: This was commented out because the windows flutter engine does not // populate the settings snapshots. Ideally we would call // ConfigureShorebird from the embedder and this would be uncommented. @@ -145,7 +147,7 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); - std::string active_path = ""; + std::string active_path; if (c_active_path != NULL) { active_path = c_active_path; shorebird_free_string(c_active_path); @@ -165,7 +167,7 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { // initialized but never run before the app is quit, could still cause us to // suddenly mark-bad a patch that was never actually attempted to launch. if (!init_result) { - return ""; + return -1; } // Once start_update_thread is called, the next_boot_patch* functions may @@ -181,8 +183,8 @@ std::string ConfigureShorebird(const ShorebirdConfigArgs& args) { << "Shorebird auto_update disabled, not checking for updates."; } - FML_LOG(INFO) << "Returning active path: " << active_path; - return active_path; + *patch_path = active_path; + return kSuccess; } void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index 9fadee6351894..2a04515228714 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -30,7 +30,8 @@ struct ShorebirdConfigArgs { release_version(release_version) {} }; -std::string ConfigureShorebird(const ShorebirdConfigArgs& args); +bool ConfigureShorebird(const ShorebirdConfigArgs& args, + std::string* patch_path); void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, flutter::Settings& settings); diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 4d1c86e8a064a..60f97072f8dcf 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -333,12 +333,15 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { flutter::ShorebirdConfigArgs shorebird_args = flutter::ShorebirdConfigArgs(code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, release_version); - auto patch_path = flutter::ConfigureShorebird(shorebird_args); - if (!patch_path.empty()) { + std::string patch_path; + auto configure_result = flutter::ConfigureShorebird(shorebird_args, &patch_path); + if (configure_result == kSuccess) { // If we have a patch installed, we replace the default AOT library path // with the patch path here. FML_LOG(INFO) << "Setting project patch path: " << patch_path; project_->SetAotLibraryPath(patch_path); + } else { + FML_LOG(ERROR) << "Failed to configure Shorebird."; } } From a9a1cce1f501cbd89ce35895638cf54c7e271384 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 14:37:33 -0500 Subject: [PATCH 40/50] formatting --- shell/platform/windows/flutter_windows_engine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 60f97072f8dcf..9f7c5374a061d 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -334,7 +334,8 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { flutter::ShorebirdConfigArgs(code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, release_version); std::string patch_path; - auto configure_result = flutter::ConfigureShorebird(shorebird_args, &patch_path); + auto configure_result = + flutter::ConfigureShorebird(shorebird_args, &patch_path); if (configure_result == kSuccess) { // If we have a patch installed, we replace the default AOT library path // with the patch path here. From 6bcd83e60e9ff101bc3dde8a2d5176c3123c7bce Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 3 Jan 2025 15:12:29 -0500 Subject: [PATCH 41/50] fix deps --- DEPS | 2374 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 1187 insertions(+), 1187 deletions(-) diff --git a/DEPS b/DEPS index 70fa293f30df3..2f543c8b3030d 100644 --- a/DEPS +++ b/DEPS @@ -1,1187 +1,1187 @@ -# The dependencies referenced by the Flutter Engine. -# -# This file is referenced by the .gclient file at the root of the checkout. -# To preview changes to the dependencies, update this file and run -# `gclient sync`. -# -# When adding a new dependency, please update the top-level .gitignore file -# to list the dependency's destination directory. - -vars = { - 'chromium_git': 'https://chromium.googlesource.com', - 'swiftshader_git': 'https://swiftshader.googlesource.com', - 'dart_git': 'https://dart.googlesource.com', - 'flutter_git': 'https://flutter.googlesource.com', - 'skia_git': 'https://skia.googlesource.com', - 'llvm_git': 'https://llvm.googlesource.com', - 'skia_revision': '6062afaa505bf7e6c727a20cafe4c7bee0f02df8', - "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", - "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", - "updater_git": "https://github.com/shorebirdtech/updater.git", - "updater_rev": "71b5ed65fab03fcf241edf0c74d027de9998da51", - - # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY - # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. - 'canvaskit_cipd_instance': '61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C', - - # Do not download the Emscripten SDK by default. - # This prevents us from downloading the Emscripten toolchain for builds - # which do not build for the web. This toolchain is needed to build CanvasKit - # for the web engine. - 'download_emsdk': False, - - # For experimental features some dependencies may only be avaialable in the master/main - # channels. This variable is being set when CI is checking out the repository. - 'release_candidate': False, - - # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision - # should be kept up to date with the revisions pulled by Dart. - # - # The list of revisions for these tools comes from Fuchsia, here: - # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain - # If there are problems with the toolchain, contact fuchsia-toolchain@. - # - # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) - # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that - # updates to Clang Tidy will not turn the tree red. - # - # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit - 'clang_version': 'git_revision:725656bdd885483c39f482a01ea25d67acf39c46', - - 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', - - 'gcloud_version': 'version:2@444.0.0.chromium.3', - - 'esbuild_version': '0.19.5', - - # When updating the Dart revision, ensure that all entries that are - # dependencies of Dart are also updated to match the entries in the - # Dart SDK's DEPS file for that revision of Dart. The DEPS file for - # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS - # You can use //tools/dart/create_updated_flutter_deps.py to produce - # updated revision list of existing dependencies. - 'dart_revision': 'ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04', - - # WARNING: DO NOT EDIT MANUALLY - # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py - 'dart_binaryen_rev': '459bc0797f67cb2a8fd4598bb7143b34036608d9', - 'dart_boringssl_gen_rev': 'fef055e8d2749b82c79c8f043be1cbe5e8e4b40c', - 'dart_boringssl_rev': '2db0eb3f96a5756298dcd7f9319e56a98585bd10', - 'dart_browser_launcher_rev': 'e5fc5d488eb5038bfec2a6690c72ab8dd353e101', - 'dart_clock_rev': '7956d60042f4ea979c4554d43eeb57d087627869', - 'dart_collection_rev': '24b75d85df6a26aac7be13b56ff1ce4360c04a64', - 'dart_devtools_rev': 'dcef4f6efe986f110f55dbbe7f3731802e86690a', - 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', - 'dart_perfetto_rev': '13ce0c9e13b0940d2476cd0cff2301708a9a2e2b', - 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', - 'dart_protobuf_rev': 'ccf104dbc36929c0f8708285d5f3a8fae206343e', - 'dart_pub_rev': '1efd3f5e274e153637d99698b0ee454f6f2550ab', - 'dart_tools_rev': 'd4995d47b99d5e9564abfed2218f4a23df75983b', - 'dart_watcher_rev': '3b850778ad0b62db3aa2cfe48832870c2461db30', - 'dart_web_rev': '8478cd27d574249eca3d41f9135458dfda2762c8', - 'dart_webdev_rev': '5f30c560dc4e3df341356c43ec1a766ee6b74a7c', - 'dart_webkit_inspection_protocol_rev': 'b459c427b74bf5e0919a083a97a167fb74d8bff1', - 'dart_yaml_edit_rev': '5c54d455f272bbb83c948ac420c677371e69ae77', - - 'ocmock_rev': 'c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8', # v3.7.1 - - # Download a prebuilt Dart SDK by default - 'download_dart_sdk': True, - - # Download a prebuilt esbuild by default - 'download_esbuild': True, - - # Checkout Android dependencies only on platforms where we build for Android targets. - 'download_android_deps': 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', - - # Checkout Java dependencies only on platforms that do not have java installed on path. - 'download_jdk': True, - - # Checkout Windows dependencies only if we are building on Windows. - 'download_windows_deps' : 'host_os == "win"', - - # Checkout Linux dependencies only when building on Linux. - 'download_linux_deps': 'host_os == "linux"', - - # The minimum macOS SDK version. This must match the setting in - # //flutter/tools/gn. - 'mac_sdk_min': '10.14', - - # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which - # controls the behavior of all fuchsia related flags. I.e. any fuchsia related - # logic or condition may not work if this flag is False. - # TODO(zijiehe): Make this condition more strict to only download fuchsia - # dependencies when necessary: b/40935282 - 'download_fuchsia_deps': 'host_os == "linux"', - # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable - # is currently only used for the Fuchsia LSC process and is not intended for - # local development. - 'download_fuchsia_sdk': False, - 'fuchsia_sdk_path': '', - # Whether to download and run the Fuchsia emulator locally to test Fuchsia - # builds. - 'run_fuchsia_emu': False, - - # An LLVM backend needs LLVM binaries and headers. To avoid build time - # increases we can use prebuilts. We don't want to download this on every - # CQ/CI bot nor do we want the average Dart developer to incur that cost. - # So by default we will not download prebuilts. This variable is needed in - # the flutter engine to ensure that Dart gn has access to it as well. - "checkout_llvm": False, - - # Setup Git hooks by default. - 'setup_githooks': True, - - # When this is true, the Flutter Engine's configuration files and scripts for - # RBE will be downloaded from CIPD. This option is only usable by Googlers. - 'use_rbe': False, - - # This is not downloaded be default because it increases the - # `gclient sync` time by between 1 and 3 minutes. This option is enabled - # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to - # only be useful locally when reproducing issues found by the bot. - 'download_impeller_cmake_example': False, - - # Upstream URLs for third party dependencies, used in - # determining common ancestor commit for vulnerability scanning - # prefixed with 'upstream_' in order to be identified by parsing tool. - # The vulnerability database being used in this scan can be browsed - # using this UI https://osv.dev/list - # If a new dependency needs to be added, the upstream (non-mirrored) - # git URL for that dependency should be added to this list - # with the key-value pair being: - # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' - # example: - "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", - "upstream_angle": "https://github.com/google/angle.git", - "upstream_archive": "https://github.com/brendan-duncan/archive.git", - "upstream_args": "https://github.com/dart-lang/args.git", - "upstream_async": "https://github.com/dart-lang/async.git", - "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", - "upstream_benchmark": "https://github.com/google/benchmark.git", - "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", - "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", - "upstream_boringssl": "https://github.com/openssl/openssl.git", - "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", - "upstream_buildroot": "https://github.com/flutter/buildroot.git", - "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", - "upstream_clock": "https://github.com/dart-lang/clock.git", - "upstream_collection": "https://github.com/dart-lang/collection.git", - "upstream_convert": "https://github.com/dart-lang/convert.git", - "upstream_crypto": "https://github.com/dart-lang/crypto.git", - "upstream_csslib": "https://github.com/dart-lang/csslib.git", - "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", - "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", - "upstream_equatable": "https://github.com/felangel/equatable.git", - "upstream_ffi": "https://github.com/dart-lang/ffi.git", - "upstream_file": "https://github.com/google/file.dart.git", - "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", - "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", - "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", - "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", - "upstream_glfw": "https://github.com/glfw/glfw.git", - "upstream_glob": "https://github.com/dart-lang/glob.git", - "upstream_googleapis": "https://github.com/google/googleapis.dart.git", - "upstream_googletest": "https://github.com/google/googletest.git", - "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", - "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", - "upstream_html": "https://github.com/dart-lang/html.git", - "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", - "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", - "upstream_http": "https://github.com/dart-lang/http.git", - "upstream_icu": "https://github.com/unicode-org/icu.git", - "upstream_intl": "https://github.com/dart-lang/intl.git", - "upstream_imgui": "https://github.com/ocornut/imgui.git", - "upstream_inja": "https://github.com/pantor/inja.git", - "upstream_json": "https://github.com/nlohmann/json.git", - "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", - "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", - "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", - "upstream_libexpat": "https://github.com/libexpat/libexpat.git", - "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", - "upstream_libpng": "https://github.com/glennrp/libpng.git", - "upstream_libtess2": "https://github.com/memononen/libtess2.git", - "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", - "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", - "upstream_logging": "https://github.com/dart-lang/logging.git", - "upstream_markdown": "https://github.com/dart-lang/markdown.git", - "upstream_matcher": "https://github.com/dart-lang/matcher.git", - "upstream_mockito": "https://github.com/dart-lang/mockito.git", - "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", - "upstream_package_config": "https://github.com/dart-lang/package_config.git", - "upstream_packages": "https://github.com/flutter/packages.git", - "upstream_path": "https://github.com/dart-lang/path.git", - "upstream_platform": "https://github.com/google/platform.dart.git", - "upstream_pool": "https://github.com/dart-lang/pool.git", - "upstream_process_runner": "https://github.com/google/process_runner.git", - "upstream_process": "https://github.com/google/process.dart.git", - "upstream_protobuf": "https://github.com/google/protobuf.dart.git", - "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", - "upstream_pub": "https://github.com/dart-lang/pub.git", - "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", - "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", - "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", - "upstream_sdk": "https://github.com/dart-lang/sdk.git", - "upstream_shaderc": "https://github.com/google/shaderc.git", - "upstream_shelf": "https://github.com/dart-lang/shelf.git", - "upstream_skia": "https://skia.googlesource.com/skia.git", - "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", - "upstream_source_span": "https://github.com/dart-lang/source_span.git", - "upstream_sqlite": "https://github.com/sqlite/sqlite.git", - "upstream_sse": "https://github.com/dart-lang/sse.git", - "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", - "upstream_stb": "https://github.com/nothings/stb.git", - "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", - "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", - "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", - "upstream_tar": "https://github.com/simolus3/tar.git", - "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", - "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", - "upstream_test": "https://github.com/dart-lang/test.git", - "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", - "upstream_usage": "https://github.com/dart-lang/usage.git", - "upstream_vector_math": "https://github.com/google/vector_math.dart.git", - "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", - "upstream_watcher": "https://github.com/dart-lang/watcher.git", - "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", - "upstream_webdev": "https://github.com/dart-lang/webdev.git", - "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", - "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", - "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", - "upstream_yaml": "https://github.com/dart-lang/yaml.git", - "upstream_yapf": "https://github.com/google/yapf.git", - "upstream_zlib": "https://github.com/madler/zlib.git", - - # The version / instance id of the cipd:chromium/fuchsia/test-scripts which - # will be used altogether with fuchsia-sdk to setup the build / test - # environment. - 'fuchsia_test_scripts_version': '_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC', - - # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be - # used altogether with fuchsia-sdk to generate gn based build rules. - 'fuchsia_gn_sdk_version': 'tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC', -} - -gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" -gclient_gn_args = ["checkout_llvm"] - -# Only these hosts are allowed for dependencies in this DEPS file. -# If you need to add a new host, contact chrome infrastructure team. -allowed_hosts = [ - "boringssl.googlesource.com", - "chrome-infra-packages.appspot.com", - "chromium.googlesource.com", - "dart.googlesource.com", - "flutter.googlesource.com", - "llvm.googlesource.com", - "skia.googlesource.com", - "swiftshader.googlesource.com", -] - -deps = { - 'src': 'https://github.com/shorebirdtech/buildroot.git' + '@' + '4c5c8abd2ab1ac7c2c029503c71450a87bf94307', - - 'src/flutter/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', - - 'src/flutter/third_party/rapidjson': - Var('flutter_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', - - 'src/flutter/third_party/harfbuzz': - Var('flutter_git') + '/third_party/harfbuzz' + '@' + 'ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2', - - 'src/flutter/third_party/libcxx': - Var('llvm_git') + '/llvm-project/libcxx' + '@' + '44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0', - - 'src/flutter/third_party/libcxxabi': - Var('llvm_git') + '/llvm-project/libcxxabi' + '@' + '2ce528fb5e0f92e57c97ec3ff53b75359d33af12', - - 'src/flutter/third_party/glfw': - Var('flutter_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', - - 'src/flutter/third_party/shaderc': - Var('chromium_git') + '/external/github.com/google/shaderc' + '@' + '37e25539ce199ecaf19fb7f7d27818716d36686d', - - 'src/flutter/third_party/vulkan-deps': - Var('chromium_git') + '/vulkan-deps' + '@' + '014f44e134a1de387791bffacc32ff9d8db71176', - - 'src/flutter/third_party/flatbuffers': - Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', - - 'src/flutter/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb', - - 'src/flutter/third_party/gtest-parallel': - Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', - - 'src/flutter/third_party/benchmark': - Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', - - 'src/flutter/third_party/googletest': - Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0', - - 'src/flutter/third_party/boringssl': - Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), - - 'src/flutter/third_party/yapf': - Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', - - 'src/flutter/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'), - - 'src/flutter/third_party/perfetto': - Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'), - - 'src/flutter/third_party/protobuf': - Var('flutter_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'), - - # TODO(67373): These are temporarily checked in, but this dep can be restored - # once the buildmoot is completed. - # 'src/flutter/build/secondary/third_party/protobuf': - # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), - - 'src/flutter/third_party/dart': - Var('dart_sdk_git') + '@' + Var('dart_sdk_revision'), - - # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. - - 'src/flutter/third_party/dart/third_party/binaryen/src': - Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9', - - 'src/flutter/third_party/dart/third_party/devtools': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056'}]}, - - 'src/flutter/third_party/dart/third_party/pkg/args': - Var('dart_git') + '/args.git@e623652744c82533829f2e62b1aba1a6cf06e291', - - 'src/flutter/third_party/dart/third_party/pkg/async': - Var('dart_git') + '/async.git@c0d81f8699682d01d657a9bf827107d11904a247', - - 'src/flutter/third_party/dart/third_party/pkg/bazel_worker': - Var('dart_git') + '/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac', - - 'src/flutter/third_party/dart/third_party/pkg/boolean_selector': - Var('dart_git') + '/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68', - - 'src/flutter/third_party/dart/third_party/pkg/browser_launcher': - Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/cli_util': - Var('dart_git') + '/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38', - - 'src/flutter/third_party/dart/third_party/pkg/clock': - Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/collection': - Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/convert': - Var('dart_git') + '/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a', - - 'src/flutter/third_party/dart/third_party/pkg/crypto': - Var('dart_git') + '/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57', - - 'src/flutter/third_party/dart/third_party/pkg/csslib': - Var('dart_git') + '/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249', - - 'src/flutter/third_party/dart/third_party/pkg/dart_style': - Var('dart_git') + '/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e', - - 'src/flutter/third_party/dart/third_party/pkg/dartdoc': - Var('dart_git') + '/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0', - - 'src/flutter/third_party/dart/third_party/pkg/file': - Var('dart_git') + '/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e', - - 'src/flutter/third_party/dart/third_party/pkg/fixnum': - Var('dart_git') + '/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0', - - 'src/flutter/third_party/dart/third_party/pkg/glob': - Var('dart_git') + '/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52', - - 'src/flutter/third_party/dart/third_party/pkg/html': - Var('dart_git') + '/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4', - - 'src/flutter/third_party/dart/third_party/pkg/http': - Var('dart_git') + '/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525', - - 'src/flutter/third_party/dart/third_party/pkg/http_multi_server': - Var('dart_git') + '/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0', - - 'src/flutter/third_party/dart/third_party/pkg/http_parser': - Var('dart_git') + '/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939', - - 'src/flutter/third_party/dart/third_party/pkg/intl': - Var('dart_git') + '/intl.git@5d65e3808ce40e6282e40881492607df4e35669f', - - 'src/flutter/third_party/dart/third_party/pkg/json_rpc_2': - Var('dart_git') + '/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce', - - 'src/flutter/third_party/dart/third_party/pkg/leak_tracker': - Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c', - - 'src/flutter/third_party/dart/third_party/pkg/logging': - Var('dart_git') + '/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e', - - 'src/flutter/third_party/dart/third_party/pkg/markdown': - Var('dart_git') + '/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40', - - 'src/flutter/third_party/dart/third_party/pkg/matcher': - Var('dart_git') + '/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c', - - 'src/flutter/third_party/dart/third_party/pkg/mockito': - Var('dart_git') + '/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab', - - 'src/flutter/third_party/dart/third_party/pkg/native': - Var('dart_git') + '/native.git@659511886501bcce638c3966590df04984909ef0', - - 'src/flutter/third_party/dart/third_party/pkg/package_config': - Var('dart_git') + '/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6', - - 'src/flutter/third_party/dart/third_party/pkg/path': - Var('dart_git') + '/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805', - - 'src/flutter/third_party/dart/third_party/pkg/pool': - Var('dart_git') + '/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a', - - 'src/flutter/third_party/dart/third_party/pkg/protobuf': - Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/pub': - Var('dart_git') + '/pub.git' + '@' + Var('dart_pub_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/pub_semver': - Var('dart_git') + '/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02', - - 'src/flutter/third_party/dart/third_party/pkg/shelf': - Var('dart_git') + '/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36', - - 'src/flutter/third_party/dart/third_party/pkg/source_maps': - Var('dart_git') + '/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8', - - 'src/flutter/third_party/dart/third_party/pkg/source_span': - Var('dart_git') + '/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550', - - 'src/flutter/third_party/dart/third_party/pkg/sse': - Var('dart_git') + '/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79', - - 'src/flutter/third_party/dart/third_party/pkg/stack_trace': - Var('dart_git') + '/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525', - - 'src/flutter/third_party/dart/third_party/pkg/stream_channel': - Var('dart_git') + '/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825', - - 'src/flutter/third_party/dart/third_party/pkg/string_scanner': - Var('dart_git') + '/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01', - - 'src/flutter/third_party/dart/third_party/pkg/tar': - Var('dart_git') + '/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291', - - 'src/flutter/third_party/dart/third_party/pkg/term_glyph': - Var('dart_git') + '/term_glyph.git@19d8c08a4e81122639129c62049896021910c932', - - 'src/flutter/third_party/dart/third_party/pkg/test': - Var('dart_git') + '/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b', - - 'src/flutter/third_party/dart/third_party/pkg/test_reflective_loader': - Var('dart_git') + '/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078', - - 'src/flutter/third_party/dart/third_party/pkg/tools': - Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/typed_data': - Var('dart_git') + '/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945', - - 'src/flutter/third_party/dart/third_party/pkg/watcher': - Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/web': - Var('dart_git') + '/web.git' + '@' + Var('dart_web_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/web_socket_channel': - Var('dart_git') + '/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6', - - 'src/flutter/third_party/dart/third_party/pkg/webdev': - Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol': - Var('dart_git') + '/external/github.com/google/webkit_inspection_protocol.dart.git' + '@' + Var('dart_webkit_inspection_protocol_rev'), - - 'src/flutter/third_party/dart/third_party/pkg/yaml': - Var('dart_git') + '/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15', - - 'src/flutter/third_party/dart/third_party/pkg/yaml_edit': - Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), - - 'src/flutter/third_party/dart/tools/sdks/dart-sdk': - {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'git_revision:7e6469bd51d404916395a47b011d907d2c905121'}]}, - - # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. - - # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout - 'src/flutter/prebuilts/linux-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/linux-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_dart_sdk' - }, - 'src/flutter/prebuilts/linux-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/linux-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_dart_sdk' - }, - 'src/flutter/prebuilts/macos-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/mac-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_dart_sdk' - }, - 'src/flutter/prebuilts/macos-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/mac-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_dart_sdk' - }, - 'src/flutter/prebuilts/windows-x64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/windows-amd64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_dart_sdk' - }, - 'src/flutter/prebuilts/windows-arm64/dart-sdk': { - 'packages': [ - { - 'package': 'flutter/dart-sdk/windows-arm64', - 'version': 'git_revision:'+Var('dart_revision') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_dart_sdk' - }, - - # esbuild download - 'src/flutter/prebuilts/linux-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/linux-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "linux" and download_esbuild' - }, - 'src/flutter/prebuilts/macos-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/mac-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_esbuild' - }, - 'src/flutter/prebuilts/macos-arm64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/mac-arm64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "mac" and download_esbuild' - }, - 'src/flutter/prebuilts/windows-x64/esbuild': { - 'packages': [ - { - 'package': 'flutter/tools/esbuild/windows-amd64', - 'version': Var('esbuild_version') - } - ], - 'dep_type': 'cipd', - 'condition': 'host_os == "win" and download_esbuild' - }, - - 'src/flutter/third_party/expat': - Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + '654d2de0da85662fcc7644a7acd7c2dd2cfb21f0', - - 'src/flutter/third_party/freetype2': - Var('flutter_git') + '/third_party/freetype2' + '@' + 'bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a', - - 'src/flutter/third_party/skia': - Var('skia_git') + '/skia.git' + '@' + Var('skia_revision'), - - 'src/flutter/third_party/ocmock': - Var('flutter_git') + '/third_party/ocmock' + '@' + Var('ocmock_rev'), - - 'src/third_party/updater': - Var('updater_git') + '@' + Var('updater_rev'), - - 'src/flutter/third_party/libjpeg-turbo/src': - Var('flutter_git') + '/third_party/libjpeg-turbo' + '@' + '0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f', - - 'src/flutter/third_party/libpng': - Var('flutter_git') + '/third_party/libpng' + '@' + 'de36b892e921c684ef718fec24739ae9bb49c977', - - 'src/flutter/third_party/libwebp': - Var('chromium_git') + '/webm/libwebp.git' + '@' + 'ca332209cb5567c9b249c86788cb2dbf8847e760', # 1.3.2 - - 'src/flutter/third_party/wuffs': - Var('skia_git') + '/external/github.com/google/wuffs-mirror-release-c.git' + '@' + '600cd96cf47788ee3a74b40a6028b035c9fd6a61', - - 'src/flutter/third_party/zlib': - Var('chromium_git') + '/chromium/src/third_party/zlib.git' + '@' + '7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df', - - 'src/flutter/third_party/cpu_features/src': - Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', - - 'src/flutter/third_party/inja': - Var('flutter_git') + '/third_party/inja' + '@' + '88bd6112575a80d004e551c98cf956f88ff4d445', - - 'src/flutter/third_party/libtess2': - Var('flutter_git') + '/third_party/libtess2' + '@' + '725e5e08ec8751477565f1d603fd7eb9058c277c', - - 'src/flutter/third_party/sqlite': - Var('flutter_git') + '/third_party/sqlite' + '@' + '0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c', - - 'src/flutter/third_party/pyyaml': - Var('flutter_git') + '/third_party/pyyaml.git' + '@' + '03c67afd452cdff45b41bfe65e19a2fb5b80a0e8', - - 'src/flutter/third_party/swiftshader': - Var('swiftshader_git') + '/SwiftShader.git' + '@' + '2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f', - - 'src/flutter/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', - - 'src/flutter/third_party/vulkan_memory_allocator': - Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6', - - 'src/flutter/third_party/abseil-cpp': - Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + 'ff6504dc527b25fef0f3c531e7dba0ed6b69c162', - - # Dart packages - 'src/flutter/third_party/pkg/archive': - Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + 'f1d164f8f5d8aea0be620a9b1e8d300b75a29388', # 3.6.1 - - 'src/flutter/third_party/pkg/coverage': - Var('flutter_git') + '/third_party/coverage.git' + '@' + 'bb0ab721ee4ceef1abfa413d8d6fd46013b583b9', # 1.7.2 - - 'src/flutter/third_party/pkg/equatable': - Var('flutter_git') + '/third_party/equatable.git' + '@' + '2117551ff3054f8edb1a58f63ffe1832a8d25623', # 2.0.5 - - 'src/flutter/third_party/pkg/flutter_packages': - Var('flutter_git') + '/mirrors/packages' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various - - 'src/flutter/third_party/pkg/gcloud': - Var('flutter_git') + '/third_party/gcloud.git' + '@' + 'a5276b85c4714378e84b1fb478b8feeeb686ac26', # 0.8.6-dev - - 'src/flutter/third_party/pkg/googleapis': - Var('flutter_git') + '/third_party/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various - - 'src/flutter/third_party/pkg/io': - Var('flutter_git') + '/third_party/io.git' + '@' + '997a6243aad20af4238147d9ec00bf638b9169af', # 1.0.5-wip - - 'src/flutter/third_party/pkg/node_preamble': - Var('flutter_git') + '/third_party/node_preamble.dart.git' + '@' + '47245865175929ec452d8058e563c267b64c3d64', # 2.0.2 - - 'src/flutter/third_party/pkg/platform': - Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 - - 'src/flutter/third_party/pkg/process': - Var('dart_git') + '/process.dart' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 - - 'src/flutter/third_party/pkg/process_runner': - Var('flutter_git') + '/third_party/process_runner.git' + '@' + 'f24c69efdcaf109168f23d381fa281453d2bc9b1', # 4.1.2 - - 'src/flutter/third_party/pkg/vector_math': - Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 - - 'src/flutter/third_party/imgui': - Var('flutter_git') + '/third_party/imgui.git' + '@' + '3ea0fad204e994d669f79ed29dcaf61cd5cb571d', - - 'src/flutter/third_party/json': - Var('flutter_git') + '/third_party/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642', - - 'src/flutter/third_party/stb': - Var('flutter_git') + '/third_party/stb.git' + '@' + '5736b15f7ea0ffb08dd38af21067c314d6a3aae9', - - 'src/flutter/third_party/gradle': { - 'packages': [ - { - # See tools/gradle/README.md for update instructions. - # Version here means the CIPD tag. - 'version': 'version:8.9', - 'package': 'flutter/gradle' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd' - }, - - 'src/flutter/third_party/android_tools/trace_to_text': { - 'packages': [ - { - # 25.0 downloads for both mac-amd64 and mac-arm64 - # 26.1 is not found with either platform - # 27.1 is the latest release of perfetto - 'version': 'git_tag:v25.0', - 'package': 'perfetto/trace_to_text/${{platform}}' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd' - }, - - 'src/flutter/third_party/android_tools/google-java-format': { - 'packages': [ - { - 'package': 'flutter/android/google-java-format', - 'version': 'version:1.7-1' - } - ], - # We want to be able to format these as part of CI, and the CI step that - # checks formatting runs without downloading the rest of the Android build - # tooling. Therefore unlike all the other Android-related tools, we want to - # download this every time. - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/android_tools': { - 'packages': [ - { - 'package': 'flutter/android/sdk/all/${{platform}}', - 'version': 'version:35v1' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/android_embedding_dependencies': { - 'packages': [ - { - 'package': 'flutter/android/embedding_bundle', - 'version': 'last_updated:2024-09-10T16:32:16-0700' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/java/openjdk': { - 'packages': [ - { - 'package': 'flutter/java/openjdk/${{platform}}', - 'version': 'version:17' - } - ], - # Always download the JDK since java is required for running the formatter. - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/gn': { - 'packages': [ - { - 'package': 'gn/gn/${{platform}}', - 'version': 'git_revision:b79031308cc878488202beb99883ec1f2efd9a6d' - }, - ], - 'dep_type': 'cipd', - }, - 'src/flutter/third_party/ninja': { - 'packages': [ - { - 'package': 'infra/3pp/tools/ninja/${{platform}}', - 'version': 'version:2@1.11.1.chromium.4', - } - ], - 'dep_type': 'cipd', - }, - - 'src/flutter/prebuilts/emsdk': { - 'url': Var('skia_git') + '/external/github.com/emscripten-core/emsdk.git' + '@' + 'a896e3d066448b3530dbcaa48869fafefd738f57', - 'condition': 'download_emsdk', - }, - - # Clang on mac and linux are expected to typically be the same revision. - # They are separated out so that the autoroller can more easily manage them. - 'src/flutter/buildtools/mac-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/mac-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/mac-arm64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/linux-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/linux-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "linux" or host_os == "mac"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/linux-arm64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/linux-arm64', - 'version': Var('clang_version'), - } - ], - 'condition': 'host_os == "linux" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/windows-x64/clang': { - 'packages': [ - { - 'package': 'fuchsia/third_party/clang/windows-amd64', - 'version': Var('clang_version'), - } - ], - 'condition': 'download_windows_deps', - 'dep_type': 'cipd', - }, - - # RBE binaries and configs. - 'src/flutter/buildtools/linux-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/windows-x64/reclient': { - 'packages': [ - { - 'package': 'infra/rbe/client/${{platform}}', - 'version': Var('reclient_version'), - } - ], - 'condition': 'use_rbe and download_windows_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/build/rbe': { - 'packages': [ - { - 'package': 'flutter_internal/rbe/reclient_cfgs', - 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', - } - ], - 'condition': 'use_rbe', - 'dep_type': 'cipd', - }, - - # gcloud - 'src/flutter/buildtools/linux-x64/gcloud': { - 'packages': [ - { - 'package': 'infra/3pp/tools/gcloud/${{platform}}', - 'version': Var('gcloud_version'), - } - ], - 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', - 'dep_type': 'cipd', - }, - - 'src/flutter/buildtools/mac-arm64/gcloud': { - 'packages': [ - { - 'package': 'infra/3pp/tools/gcloud/${{platform}}', - 'version': Var('gcloud_version'), - } - ], - 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', - 'dep_type': 'cipd', - }, - - # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag - # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag - 'src/fuchsia/sdk/linux': { - 'packages': [ - { - 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC' - } - ], - 'condition': 'download_fuchsia_deps and not download_fuchsia_sdk', - 'dep_type': 'cipd', - }, - - 'src/flutter/tools/fuchsia/test_scripts': { - 'packages': [ - { - 'package': 'chromium/fuchsia/test-scripts', - 'version': Var('fuchsia_test_scripts_version'), - } - ], - 'condition': 'download_fuchsia_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/tools/fuchsia/gn-sdk': { - 'packages': [ - { - 'package': 'chromium/fuchsia/gn-sdk', - 'version': Var('fuchsia_gn_sdk_version'), - } - ], - 'condition': 'download_fuchsia_deps', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/impeller-cmake-example': { - 'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + '9f8298ec31dcbebbf019bd487888166abf2f55e6', - 'condition': 'download_impeller_cmake_example', - }, - - # cmake is only used by impeller-cmake-example. - 'src/flutter/buildtools/mac-x64/cmake': { - 'packages': [ - { - 'package': 'infra/3pp/tools/cmake/mac-amd64', - 'version': 'CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC', - } - ], - 'condition': 'download_impeller_cmake_example and host_os == "mac"', - 'dep_type': 'cipd', - }, - - 'src/flutter/third_party/google_fonts_for_unit_tests': { - 'packages': [ - { - 'package': 'flutter/flutter_font_fallbacks', - 'version': 'c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea' - } - ], - 'dep_type': 'cipd', - } -} - -recursedeps = [ - "src/flutter/third_party/vulkan-deps", -] - -hooks = [ - { - # Generate the Dart SDK's .dart_tool/package_confg.json file. - "name": "Generate .dart_tool/package_confg.json", - "pattern": ".", - "action": [ - "python3", - "src/flutter/third_party/dart/tools/generate_package_config.py", - ], - }, - { - # Generate the sdk/version file. - "name": "Generate sdk/version", - "pattern": ".", - "action": [ - "python3", - "src/flutter/third_party/dart/tools/generate_sdk_version_file.py", - ], - }, - { - # Update the Windows toolchain if necessary. - "name": "win_toolchain", - "condition": "download_windows_deps", - "pattern": ".", - "action": ["python3", "src/build/vs_toolchain.py", "update"], - }, - { - "name": "dia_dll", - "pattern": ".", - "condition": "download_windows_deps", - "action": [ - "python3", - "src/flutter/tools/dia_dll.py", - ], - }, - { - "name": "linux_sysroot_x64", - "pattern": ".", - "condition": "download_linux_deps", - "action": [ - "python3", - "src/build/linux/sysroot_scripts/install-sysroot.py", - "--arch=x64", - ], - }, - { - "name": "linux_sysroot_arm64", - "pattern": ".", - "condition": "download_linux_deps", - "action": [ - "python3", - "src/build/linux/sysroot_scripts/install-sysroot.py", - "--arch=arm64", - ], - }, - { - "name": "pub get --offline", - "pattern": ".", - "action": [ - "python3", - "src/flutter/tools/pub_get_offline.py", - ], - }, - { - "name": "Download Fuchsia SDK", - "pattern": ".", - "condition": "download_fuchsia_deps and download_fuchsia_sdk", - "action": [ - "python3", - "src/flutter/tools/download_fuchsia_sdk.py", - "--fail-loudly", - "--verbose", - "--host-os", - Var("host_os"), - "--fuchsia-sdk-path", - Var("fuchsia_sdk_path"), - ], - }, - { - "name": "Activate Emscripten SDK", - "pattern": ".", - "condition": "download_emsdk", - "action": [ - "python3", - "src/flutter/tools/activate_emsdk.py", - ], - }, - { - "name": "Setup githooks", - "pattern": ".", - "condition": "setup_githooks", - "action": [ - "python3", - "src/flutter/tools/githooks/setup.py", - ], - }, - { - "name": "impeller-cmake-example submodules", - "pattern": ".", - "condition": "download_impeller_cmake_example", - "action": [ - "python3", - "src/flutter/ci/impeller_cmake_build_test.py", - "--path", - "flutter/third_party/impeller-cmake-example", - "--setup", - ], - }, - { - "name": "Download Fuchsia system images", - "pattern": ".", - "condition": "run_fuchsia_emu", - "action": [ - "env", - "DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}", - "FUCHSIA_SDK_PATH={fuchsia_sdk_path}", - "python3", - "src/flutter/tools/fuchsia/with_envs.py", - "src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py", - "terminal.x64,terminal.qemu-arm64", - ], - }, - # The following two scripts check if they are running in the LUCI - # environment, and do nothing if so. This is because Xcode is not yet - # installed in CI when these hooks are run. - { - "name": "Find the iOS device SDKs", - "pattern": ".", - "condition": 'host_os == "mac"', - "action": [ - "python3", - "src/build/config/ios/ios_sdk.py", - # This cleans up entries under flutter/prebuilts for this script and the - # following script. - "--as-gclient-hook", - ], - }, - { - "name": "Find the macOS SDK", - "pattern": ".", - "condition": 'host_os == "mac"', - "action": [ - "python3", - "src/build/mac/find_sdk.py", - "--as-gclient-hook", - Var("mac_sdk_min"), - ], - }, - { - "name": "Generate Fuchsia GN build rules", - "pattern": ".", - "condition": "download_fuchsia_deps", - "action": [ - "python3", - "src/flutter/tools/fuchsia/with_envs.py", - "src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py", - ], - }, -] \ No newline at end of file +# The dependencies referenced by the Flutter Engine. +# +# This file is referenced by the .gclient file at the root of the checkout. +# To preview changes to the dependencies, update this file and run +# `gclient sync`. +# +# When adding a new dependency, please update the top-level .gitignore file +# to list the dependency's destination directory. + +vars = { + 'chromium_git': 'https://chromium.googlesource.com', + 'swiftshader_git': 'https://swiftshader.googlesource.com', + 'dart_git': 'https://dart.googlesource.com', + 'flutter_git': 'https://flutter.googlesource.com', + 'skia_git': 'https://skia.googlesource.com', + 'llvm_git': 'https://llvm.googlesource.com', + 'skia_revision': '6062afaa505bf7e6c727a20cafe4c7bee0f02df8', + "dart_sdk_revision": "4f9b5084a041a0e7cc26295da1da9109df43ac4c", + "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", + "updater_git": "https://github.com/shorebirdtech/updater.git", + "updater_rev": "71b5ed65fab03fcf241edf0c74d027de9998da51", + + # WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY + # See `lib/web_ui/README.md` for how to roll CanvasKit to a new version. + 'canvaskit_cipd_instance': '61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C', + + # Do not download the Emscripten SDK by default. + # This prevents us from downloading the Emscripten toolchain for builds + # which do not build for the web. This toolchain is needed to build CanvasKit + # for the web engine. + 'download_emsdk': False, + + # For experimental features some dependencies may only be avaialable in the master/main + # channels. This variable is being set when CI is checking out the repository. + 'release_candidate': False, + + # As Dart does, we use Fuchsia's GN and Clang toolchain. These revision + # should be kept up to date with the revisions pulled by Dart. + # + # The list of revisions for these tools comes from Fuchsia, here: + # https://fuchsia.googlesource.com/integration/+/HEAD/toolchain + # If there are problems with the toolchain, contact fuchsia-toolchain@. + # + # Note, if you are *manually* rolling clang (i.e. the auto-roll is disabled) + # you'll need to run post-submits (i.e. for Clang Tidy) in order to test that + # updates to Clang Tidy will not turn the tree red. + # + # See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit + 'clang_version': 'git_revision:725656bdd885483c39f482a01ea25d67acf39c46', + + 'reclient_version': 'git_revision:29a9d3cb597b6a7d67fa3e9aa8a7cab1c81232ee', + + 'gcloud_version': 'version:2@444.0.0.chromium.3', + + 'esbuild_version': '0.19.5', + + # When updating the Dart revision, ensure that all entries that are + # dependencies of Dart are also updated to match the entries in the + # Dart SDK's DEPS file for that revision of Dart. The DEPS file for + # Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS + # You can use //tools/dart/create_updated_flutter_deps.py to produce + # updated revision list of existing dependencies. + 'dart_revision': 'ae7ca5199a0559db0ae60533e9cedd3ce0d6ab04', + + # WARNING: DO NOT EDIT MANUALLY + # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py + 'dart_binaryen_rev': '459bc0797f67cb2a8fd4598bb7143b34036608d9', + 'dart_boringssl_gen_rev': 'fef055e8d2749b82c79c8f043be1cbe5e8e4b40c', + 'dart_boringssl_rev': '2db0eb3f96a5756298dcd7f9319e56a98585bd10', + 'dart_browser_launcher_rev': 'e5fc5d488eb5038bfec2a6690c72ab8dd353e101', + 'dart_clock_rev': '7956d60042f4ea979c4554d43eeb57d087627869', + 'dart_collection_rev': '24b75d85df6a26aac7be13b56ff1ce4360c04a64', + 'dart_devtools_rev': 'dcef4f6efe986f110f55dbbe7f3731802e86690a', + 'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb', + 'dart_perfetto_rev': '13ce0c9e13b0940d2476cd0cff2301708a9a2e2b', + 'dart_protobuf_gn_rev': 'ca669f79945418f6229e4fef89b666b2a88cbb10', + 'dart_protobuf_rev': 'ccf104dbc36929c0f8708285d5f3a8fae206343e', + 'dart_pub_rev': '1efd3f5e274e153637d99698b0ee454f6f2550ab', + 'dart_tools_rev': 'd4995d47b99d5e9564abfed2218f4a23df75983b', + 'dart_watcher_rev': '3b850778ad0b62db3aa2cfe48832870c2461db30', + 'dart_web_rev': '8478cd27d574249eca3d41f9135458dfda2762c8', + 'dart_webdev_rev': '5f30c560dc4e3df341356c43ec1a766ee6b74a7c', + 'dart_webkit_inspection_protocol_rev': 'b459c427b74bf5e0919a083a97a167fb74d8bff1', + 'dart_yaml_edit_rev': '5c54d455f272bbb83c948ac420c677371e69ae77', + + 'ocmock_rev': 'c4ec0e3a7a9f56cfdbd0aa01f4f97bb4b75c5ef8', # v3.7.1 + + # Download a prebuilt Dart SDK by default + 'download_dart_sdk': True, + + # Download a prebuilt esbuild by default + 'download_esbuild': True, + + # Checkout Android dependencies only on platforms where we build for Android targets. + 'download_android_deps': 'host_os == "mac" or (host_os == "linux" and host_cpu == "x64")', + + # Checkout Java dependencies only on platforms that do not have java installed on path. + 'download_jdk': True, + + # Checkout Windows dependencies only if we are building on Windows. + 'download_windows_deps' : 'host_os == "win"', + + # Checkout Linux dependencies only when building on Linux. + 'download_linux_deps': 'host_os == "linux"', + + # The minimum macOS SDK version. This must match the setting in + # //flutter/tools/gn. + 'mac_sdk_min': '10.14', + + # Checkout Fuchsia dependencies only on Linux. This is the umbrella flag which + # controls the behavior of all fuchsia related flags. I.e. any fuchsia related + # logic or condition may not work if this flag is False. + # TODO(zijiehe): Make this condition more strict to only download fuchsia + # dependencies when necessary: b/40935282 + 'download_fuchsia_deps': 'host_os == "linux"', + # Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable + # is currently only used for the Fuchsia LSC process and is not intended for + # local development. + 'download_fuchsia_sdk': False, + 'fuchsia_sdk_path': '', + # Whether to download and run the Fuchsia emulator locally to test Fuchsia + # builds. + 'run_fuchsia_emu': False, + + # An LLVM backend needs LLVM binaries and headers. To avoid build time + # increases we can use prebuilts. We don't want to download this on every + # CQ/CI bot nor do we want the average Dart developer to incur that cost. + # So by default we will not download prebuilts. This variable is needed in + # the flutter engine to ensure that Dart gn has access to it as well. + "checkout_llvm": False, + + # Setup Git hooks by default. + 'setup_githooks': True, + + # When this is true, the Flutter Engine's configuration files and scripts for + # RBE will be downloaded from CIPD. This option is only usable by Googlers. + 'use_rbe': False, + + # This is not downloaded be default because it increases the + # `gclient sync` time by between 1 and 3 minutes. This option is enabled + # in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to + # only be useful locally when reproducing issues found by the bot. + 'download_impeller_cmake_example': False, + + # Upstream URLs for third party dependencies, used in + # determining common ancestor commit for vulnerability scanning + # prefixed with 'upstream_' in order to be identified by parsing tool. + # The vulnerability database being used in this scan can be browsed + # using this UI https://osv.dev/list + # If a new dependency needs to be added, the upstream (non-mirrored) + # git URL for that dependency should be added to this list + # with the key-value pair being: + # 'upstream_[dep name from last slash and before .git in URL]':'[git URL]' + # example: + "upstream_abseil-cpp": "https://github.com/abseil/abseil-cpp.git", + "upstream_angle": "https://github.com/google/angle.git", + "upstream_archive": "https://github.com/brendan-duncan/archive.git", + "upstream_args": "https://github.com/dart-lang/args.git", + "upstream_async": "https://github.com/dart-lang/async.git", + "upstream_bazel_worker": "https://github.com/dart-lang/bazel_worker.git", + "upstream_benchmark": "https://github.com/google/benchmark.git", + "upstream_boolean_selector": "https://github.com/dart-lang/boolean_selector.git", + "upstream_boringssl_gen": "https://github.com/dart-lang/boringssl_gen.git", + "upstream_boringssl": "https://github.com/openssl/openssl.git", + "upstream_browser_launcher": "https://github.com/dart-lang/browser_launcher.git", + "upstream_buildroot": "https://github.com/flutter/buildroot.git", + "upstream_cli_util": "https://github.com/dart-lang/cli_util.git", + "upstream_clock": "https://github.com/dart-lang/clock.git", + "upstream_collection": "https://github.com/dart-lang/collection.git", + "upstream_convert": "https://github.com/dart-lang/convert.git", + "upstream_crypto": "https://github.com/dart-lang/crypto.git", + "upstream_csslib": "https://github.com/dart-lang/csslib.git", + "upstream_dart_style": "https://github.com/dart-lang/dart_style.git", + "upstream_dartdoc": "https://github.com/dart-lang/dartdoc.git", + "upstream_equatable": "https://github.com/felangel/equatable.git", + "upstream_ffi": "https://github.com/dart-lang/ffi.git", + "upstream_file": "https://github.com/google/file.dart.git", + "upstream_fixnum": "https://github.com/dart-lang/fixnum.git", + "upstream_flatbuffers": "https://github.com/google/flatbuffers.git", + "upstream_freetype2": "https://gitlab.freedesktop.org/freetype/freetype.git", + "upstream_gcloud": "https://github.com/dart-lang/gcloud.git", + "upstream_glfw": "https://github.com/glfw/glfw.git", + "upstream_glob": "https://github.com/dart-lang/glob.git", + "upstream_googleapis": "https://github.com/google/googleapis.dart.git", + "upstream_googletest": "https://github.com/google/googletest.git", + "upstream_gtest-parallel": "https://github.com/google/gtest-parallel.git", + "upstream_harfbuzz": "https://github.com/harfbuzz/harfbuzz.git", + "upstream_html": "https://github.com/dart-lang/html.git", + "upstream_http_multi_server": "https://github.com/dart-lang/http_multi_server.git", + "upstream_http_parser": "https://github.com/dart-lang/http_parser.git", + "upstream_http": "https://github.com/dart-lang/http.git", + "upstream_icu": "https://github.com/unicode-org/icu.git", + "upstream_intl": "https://github.com/dart-lang/intl.git", + "upstream_imgui": "https://github.com/ocornut/imgui.git", + "upstream_inja": "https://github.com/pantor/inja.git", + "upstream_json": "https://github.com/nlohmann/json.git", + "upstream_json_rpc_2": "https://github.com/dart-lang/json_rpc_2.git", + "upstream_libcxx": "https://github.com/llvm-mirror/libcxx.git", + "upstream_libcxxabi": "https://github.com/llvm-mirror/libcxxabi.git", + "upstream_libexpat": "https://github.com/libexpat/libexpat.git", + "upstream_libjpeg-turbo": "https://github.com/libjpeg-turbo/libjpeg-turbo.git", + "upstream_libpng": "https://github.com/glennrp/libpng.git", + "upstream_libtess2": "https://github.com/memononen/libtess2.git", + "upstream_libwebp": "https://chromium.googlesource.com/webm/libwebp.git", + "upstream_leak_tracker": "https://github.com/dart-lang/leak_tracker.git", + "upstream_logging": "https://github.com/dart-lang/logging.git", + "upstream_markdown": "https://github.com/dart-lang/markdown.git", + "upstream_matcher": "https://github.com/dart-lang/matcher.git", + "upstream_mockito": "https://github.com/dart-lang/mockito.git", + "upstream_ocmock": "https://github.com/erikdoe/ocmock.git", + "upstream_package_config": "https://github.com/dart-lang/package_config.git", + "upstream_packages": "https://github.com/flutter/packages.git", + "upstream_path": "https://github.com/dart-lang/path.git", + "upstream_platform": "https://github.com/google/platform.dart.git", + "upstream_pool": "https://github.com/dart-lang/pool.git", + "upstream_process_runner": "https://github.com/google/process_runner.git", + "upstream_process": "https://github.com/google/process.dart.git", + "upstream_protobuf": "https://github.com/google/protobuf.dart.git", + "upstream_pub_semver": "https://github.com/dart-lang/pub_semver.git", + "upstream_pub": "https://github.com/dart-lang/pub.git", + "upstream_pyyaml": "https://github.com/yaml/pyyaml.git", + "upstream_quiver-dart": "https://github.com/google/quiver-dart.git", + "upstream_rapidjson": "https://github.com/Tencent/rapidjson.git", + "upstream_sdk": "https://github.com/dart-lang/sdk.git", + "upstream_shaderc": "https://github.com/google/shaderc.git", + "upstream_shelf": "https://github.com/dart-lang/shelf.git", + "upstream_skia": "https://skia.googlesource.com/skia.git", + "upstream_source_maps": "https://github.com/dart-lang/source_maps.git", + "upstream_source_span": "https://github.com/dart-lang/source_span.git", + "upstream_sqlite": "https://github.com/sqlite/sqlite.git", + "upstream_sse": "https://github.com/dart-lang/sse.git", + "upstream_stack_trace": "https://github.com/dart-lang/stack_trace.git", + "upstream_stb": "https://github.com/nothings/stb.git", + "upstream_stream_channel": "https://github.com/dart-lang/stream_channel.git", + "upstream_string_scanner": "https://github.com/dart-lang/string_scanner.git", + "upstream_SwiftShader": "https://swiftshader.googlesource.com/SwiftShader.git", + "upstream_tar": "https://github.com/simolus3/tar.git", + "upstream_term_glyph": "https://github.com/dart-lang/term_glyph.git", + "upstream_test_reflective_loader": "https://github.com/dart-lang/test_reflective_loader.git", + "upstream_test": "https://github.com/dart-lang/test.git", + "upstream_typed_data": "https://github.com/dart-lang/typed_data.git", + "upstream_usage": "https://github.com/dart-lang/usage.git", + "upstream_vector_math": "https://github.com/google/vector_math.dart.git", + "upstream_VulkanMemoryAllocator": "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git", + "upstream_watcher": "https://github.com/dart-lang/watcher.git", + "upstream_web_socket_channel": "https://github.com/dart-lang/web_socket_channel.git", + "upstream_webdev": "https://github.com/dart-lang/webdev.git", + "upstream_webkit_inspection_protocol": "https://github.com/google/webkit_inspection_protocol.dart.git", + "upstream_wuffs-mirror-release-c": "https://github.com/google/wuffs-mirror-release-c.git", + "upstream_yaml_edit": "https://github.com/dart-lang/yaml_edit.git", + "upstream_yaml": "https://github.com/dart-lang/yaml.git", + "upstream_yapf": "https://github.com/google/yapf.git", + "upstream_zlib": "https://github.com/madler/zlib.git", + + # The version / instance id of the cipd:chromium/fuchsia/test-scripts which + # will be used altogether with fuchsia-sdk to setup the build / test + # environment. + 'fuchsia_test_scripts_version': '_fkA2GjLQH4bc_n2pbwmUEsGfjReXWXHt0zA1jm8EEkC', + + # The version / instance id of the cipd:chromium/fuchsia/gn-sdk which will be + # used altogether with fuchsia-sdk to generate gn based build rules. + 'fuchsia_gn_sdk_version': 'tHRCseOuPnZ5H4a7kb4Zl6YQ2rhEDWIzcEX3G9NPFhkC', +} + +gclient_gn_args_file = "src/flutter/third_party/dart/build/config/gclient_args.gni" +gclient_gn_args = ["checkout_llvm"] + +# Only these hosts are allowed for dependencies in this DEPS file. +# If you need to add a new host, contact chrome infrastructure team. +allowed_hosts = [ + "boringssl.googlesource.com", + "chrome-infra-packages.appspot.com", + "chromium.googlesource.com", + "dart.googlesource.com", + "flutter.googlesource.com", + "llvm.googlesource.com", + "skia.googlesource.com", + "swiftshader.googlesource.com", +] + +deps = { + 'src': 'https://github.com/shorebirdtech/buildroot.git' + '@' + '4c5c8abd2ab1ac7c2c029503c71450a87bf94307', + + 'src/flutter/third_party/depot_tools': + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', + + 'src/flutter/third_party/rapidjson': + Var('flutter_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', + + 'src/flutter/third_party/harfbuzz': + Var('flutter_git') + '/third_party/harfbuzz' + '@' + 'ea8f97c615f0ba17dc25013ef67dbd6bfaaa76f2', + + 'src/flutter/third_party/libcxx': + Var('llvm_git') + '/llvm-project/libcxx' + '@' + '44079a4cc04cdeffb9cfe8067bfb3c276fb2bab0', + + 'src/flutter/third_party/libcxxabi': + Var('llvm_git') + '/llvm-project/libcxxabi' + '@' + '2ce528fb5e0f92e57c97ec3ff53b75359d33af12', + + 'src/flutter/third_party/glfw': + Var('flutter_git') + '/third_party/glfw' + '@' + 'dd8a678a66f1967372e5a5e3deac41ebf65ee127', + + 'src/flutter/third_party/shaderc': + Var('chromium_git') + '/external/github.com/google/shaderc' + '@' + '37e25539ce199ecaf19fb7f7d27818716d36686d', + + 'src/flutter/third_party/vulkan-deps': + Var('chromium_git') + '/vulkan-deps' + '@' + '014f44e134a1de387791bffacc32ff9d8db71176', + + 'src/flutter/third_party/flatbuffers': + Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709', + + 'src/flutter/third_party/icu': + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '9408c6fd4a39e6fef0e1c4077602e1c83b15f3fb', + + 'src/flutter/third_party/gtest-parallel': + Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', + + 'src/flutter/third_party/benchmark': + Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', + + 'src/flutter/third_party/googletest': + Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0', + + 'src/flutter/third_party/boringssl': + Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), + + 'src/flutter/third_party/yapf': + Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', + + 'src/flutter/third_party/boringssl/src': + 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'), + + 'src/flutter/third_party/perfetto': + Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'), + + 'src/flutter/third_party/protobuf': + Var('flutter_git') + '/third_party/protobuf' + '@' + Var('dart_libprotobuf_rev'), + + # TODO(67373): These are temporarily checked in, but this dep can be restored + # once the buildmoot is completed. + # 'src/flutter/build/secondary/third_party/protobuf': + # Var('flutter_git') + '/third_party/protobuf-gn' + '@' + Var('dart_protobuf_gn_rev'), + + 'src/flutter/third_party/dart': + Var('dart_sdk_git') + '@' + Var('dart_sdk_revision'), + + # WARNING: Unused Dart dependencies in the list below till "WARNING:" marker are removed automatically - see create_updated_flutter_deps.py. + + 'src/flutter/third_party/dart/third_party/binaryen/src': + Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@459bc0797f67cb2a8fd4598bb7143b34036608d9', + + 'src/flutter/third_party/dart/third_party/devtools': + {'dep_type': 'cipd', 'packages': [{'package': 'dart/third_party/flutter/devtools', 'version': 'git_revision:f5e84f91b32b219d646cfb87a891cd143dc84056'}]}, + + 'src/flutter/third_party/dart/third_party/pkg/args': + Var('dart_git') + '/args.git@e623652744c82533829f2e62b1aba1a6cf06e291', + + 'src/flutter/third_party/dart/third_party/pkg/async': + Var('dart_git') + '/async.git@c0d81f8699682d01d657a9bf827107d11904a247', + + 'src/flutter/third_party/dart/third_party/pkg/bazel_worker': + Var('dart_git') + '/bazel_worker.git@aa3cc9e826350b960e0c5a67e6065bcedba8b0ac', + + 'src/flutter/third_party/dart/third_party/pkg/boolean_selector': + Var('dart_git') + '/boolean_selector.git@d6c7c36ae1111f11cc24306d71d3ab2deea8fa68', + + 'src/flutter/third_party/dart/third_party/pkg/browser_launcher': + Var('dart_git') + '/browser_launcher.git' + '@' + Var('dart_browser_launcher_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/cli_util': + Var('dart_git') + '/cli_util.git@c36b3941e38092d6d6f87ac27d9e88f153d3ac38', + + 'src/flutter/third_party/dart/third_party/pkg/clock': + Var('dart_git') + '/clock.git' + '@' + Var('dart_clock_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/collection': + Var('dart_git') + '/collection.git' + '@' + Var('dart_collection_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/convert': + Var('dart_git') + '/convert.git@9035cafefc1da4315f26058734d0c2a19d5ab56a', + + 'src/flutter/third_party/dart/third_party/pkg/crypto': + Var('dart_git') + '/crypto.git@eede7d6918c51159c1422b7449f40dbac660ee57', + + 'src/flutter/third_party/dart/third_party/pkg/csslib': + Var('dart_git') + '/csslib.git@a3700b05bbcc42782e8a7024790dbf019d89c249', + + 'src/flutter/third_party/dart/third_party/pkg/dart_style': + Var('dart_git') + '/dart_style.git@5d35f4d829ffb8532d345d95d3e9504ae6cd839e', + + 'src/flutter/third_party/dart/third_party/pkg/dartdoc': + Var('dart_git') + '/dartdoc.git@5df03dd913a0a2e20421cac61112aa84111160e0', + + 'src/flutter/third_party/dart/third_party/pkg/file': + Var('dart_git') + '/external/github.com/google/file.dart@6842feaef1c4e06239bd30f8d3ef722838b1c97e', + + 'src/flutter/third_party/dart/third_party/pkg/fixnum': + Var('dart_git') + '/fixnum.git@83293b8ed86ccd574a94fcf4a2da43f31c1b43e0', + + 'src/flutter/third_party/dart/third_party/pkg/glob': + Var('dart_git') + '/glob.git@00a9c82d31c01ae88ec9ae4021d842e9b832aa52', + + 'src/flutter/third_party/dart/third_party/pkg/html': + Var('dart_git') + '/html.git@6d3bc86cf2ab530ef3fa5f84b5980dc318a02af4', + + 'src/flutter/third_party/dart/third_party/pkg/http': + Var('dart_git') + '/http.git@f59cd79e1322c6272481e4f2ccfa9afcb37a6525', + + 'src/flutter/third_party/dart/third_party/pkg/http_multi_server': + Var('dart_git') + '/http_multi_server.git@e7515b5896b83d522189802a1e14e103e19426c0', + + 'src/flutter/third_party/dart/third_party/pkg/http_parser': + Var('dart_git') + '/http_parser.git@ce528cf82f3d26ac761e29b2494a9e0c270d4939', + + 'src/flutter/third_party/dart/third_party/pkg/intl': + Var('dart_git') + '/intl.git@5d65e3808ce40e6282e40881492607df4e35669f', + + 'src/flutter/third_party/dart/third_party/pkg/json_rpc_2': + Var('dart_git') + '/json_rpc_2.git@b4810dc7bee5828f240586c81f3f34853cacdbce', + + 'src/flutter/third_party/dart/third_party/pkg/leak_tracker': + Var('dart_git') + '/leak_tracker.git@f5620600a5ce1c44f65ddaa02001e200b096e14c', + + 'src/flutter/third_party/dart/third_party/pkg/logging': + Var('dart_git') + '/logging.git@6fa056098ceca03d399bff64592822b2ae5dee6e', + + 'src/flutter/third_party/dart/third_party/pkg/markdown': + Var('dart_git') + '/markdown.git@d53feae0760a4f0aae5ffdfb12d8e6acccf14b40', + + 'src/flutter/third_party/dart/third_party/pkg/matcher': + Var('dart_git') + '/matcher.git@31f13583630e093731c8cf2b843c14196d748c5c', + + 'src/flutter/third_party/dart/third_party/pkg/mockito': + Var('dart_git') + '/mockito.git@3de67548e833a8eef66a2a49070b197c2c08b3ab', + + 'src/flutter/third_party/dart/third_party/pkg/native': + Var('dart_git') + '/native.git@659511886501bcce638c3966590df04984909ef0', + + 'src/flutter/third_party/dart/third_party/pkg/package_config': + Var('dart_git') + '/package_config.git@bafff8e90be25e1985f7e3ee40ea1d22571a93e6', + + 'src/flutter/third_party/dart/third_party/pkg/path': + Var('dart_git') + '/path.git@e969f42ed112dd702a9453beb9df6c12ae2d3805', + + 'src/flutter/third_party/dart/third_party/pkg/pool': + Var('dart_git') + '/pool.git@924fb04353cec915d927f9f1aed88e2eda92b98a', + + 'src/flutter/third_party/dart/third_party/pkg/protobuf': + Var('dart_git') + '/protobuf.git' + '@' + Var('dart_protobuf_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/pub': + Var('dart_git') + '/pub.git' + '@' + Var('dart_pub_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/pub_semver': + Var('dart_git') + '/pub_semver.git@8cce9d00431b6653026cdfcf6cf8548078c56f02', + + 'src/flutter/third_party/dart/third_party/pkg/shelf': + Var('dart_git') + '/shelf.git@f5600534e3e49ebed02e1e14ec82553958d86f36', + + 'src/flutter/third_party/dart/third_party/pkg/source_maps': + Var('dart_git') + '/source_maps.git@17695e81d9ad129d20effd3d5c4f1cfa03f5add8', + + 'src/flutter/third_party/dart/third_party/pkg/source_span': + Var('dart_git') + '/source_span.git@ec100b7f12e9d36d2cdb3c369fefde736de4a550', + + 'src/flutter/third_party/dart/third_party/pkg/sse': + Var('dart_git') + '/sse.git@af2c5c572a8da6d2f7551b80d75121f2a38a4c79', + + 'src/flutter/third_party/dart/third_party/pkg/stack_trace': + Var('dart_git') + '/stack_trace.git@115bcd9591d251dab7a5ad518655c2124a1cc525', + + 'src/flutter/third_party/dart/third_party/pkg/stream_channel': + Var('dart_git') + '/stream_channel.git@f4407168b275fcde9187baefd7dbce76d0992825', + + 'src/flutter/third_party/dart/third_party/pkg/string_scanner': + Var('dart_git') + '/string_scanner.git@2139417ffcd0392bde3ba9bc83ee13eaa5fbed01', + + 'src/flutter/third_party/dart/third_party/pkg/tar': + Var('dart_git') + '/external/github.com/simolus3/tar.git@32ceb55e673141abff4e84b99483fe5eb881c291', + + 'src/flutter/third_party/dart/third_party/pkg/term_glyph': + Var('dart_git') + '/term_glyph.git@19d8c08a4e81122639129c62049896021910c932', + + 'src/flutter/third_party/dart/third_party/pkg/test': + Var('dart_git') + '/test.git@8e8a83607d90a7a6813fa378b2d1962a2fc0d44b', + + 'src/flutter/third_party/dart/third_party/pkg/test_reflective_loader': + Var('dart_git') + '/test_reflective_loader.git@598af2f503955020af0eaa82558d574a03934078', + + 'src/flutter/third_party/dart/third_party/pkg/tools': + Var('dart_git') + '/tools.git' + '@' + Var('dart_tools_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/typed_data': + Var('dart_git') + '/typed_data.git@2bb9e6ead6394e2d4ec6068c5ece8b2ec0e2b945', + + 'src/flutter/third_party/dart/third_party/pkg/watcher': + Var('dart_git') + '/watcher.git' + '@' + Var('dart_watcher_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/web': + Var('dart_git') + '/web.git' + '@' + Var('dart_web_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/web_socket_channel': + Var('dart_git') + '/web_socket_channel.git@0e1d6e2eb5a0bfd62e45b772ac7107d796176cf6', + + 'src/flutter/third_party/dart/third_party/pkg/webdev': + Var('dart_git') + '/webdev.git' + '@' + Var('dart_webdev_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/webkit_inspection_protocol': + Var('dart_git') + '/external/github.com/google/webkit_inspection_protocol.dart.git' + '@' + Var('dart_webkit_inspection_protocol_rev'), + + 'src/flutter/third_party/dart/third_party/pkg/yaml': + Var('dart_git') + '/yaml.git@e773005ab84e1b4d24132b0a687be7f9a3bfda15', + + 'src/flutter/third_party/dart/third_party/pkg/yaml_edit': + Var('dart_git') + '/yaml_edit.git' + '@' + Var('dart_yaml_edit_rev'), + + 'src/flutter/third_party/dart/tools/sdks/dart-sdk': + {'dep_type': 'cipd', 'packages': [{'package': 'dart/dart-sdk/${{platform}}', 'version': 'git_revision:7e6469bd51d404916395a47b011d907d2c905121'}]}, + + # WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py. + + # Prebuilt Dart SDK of the same revision as the Dart SDK source checkout + 'src/flutter/prebuilts/linux-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/linux-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_dart_sdk' + }, + 'src/flutter/prebuilts/linux-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/linux-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_dart_sdk' + }, + 'src/flutter/prebuilts/macos-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/mac-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_dart_sdk' + }, + 'src/flutter/prebuilts/macos-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/mac-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_dart_sdk' + }, + 'src/flutter/prebuilts/windows-x64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/windows-amd64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_dart_sdk' + }, + 'src/flutter/prebuilts/windows-arm64/dart-sdk': { + 'packages': [ + { + 'package': 'flutter/dart-sdk/windows-arm64', + 'version': 'git_revision:'+Var('dart_revision') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_dart_sdk' + }, + + # esbuild download + 'src/flutter/prebuilts/linux-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/linux-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "linux" and download_esbuild' + }, + 'src/flutter/prebuilts/macos-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/mac-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_esbuild' + }, + 'src/flutter/prebuilts/macos-arm64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/mac-arm64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "mac" and download_esbuild' + }, + 'src/flutter/prebuilts/windows-x64/esbuild': { + 'packages': [ + { + 'package': 'flutter/tools/esbuild/windows-amd64', + 'version': Var('esbuild_version') + } + ], + 'dep_type': 'cipd', + 'condition': 'host_os == "win" and download_esbuild' + }, + + 'src/flutter/third_party/expat': + Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + '654d2de0da85662fcc7644a7acd7c2dd2cfb21f0', + + 'src/flutter/third_party/freetype2': + Var('flutter_git') + '/third_party/freetype2' + '@' + 'bfc3453fdc85d87b45c896f68bf2e49ebdaeef0a', + + 'src/flutter/third_party/skia': + Var('skia_git') + '/skia.git' + '@' + Var('skia_revision'), + + 'src/flutter/third_party/ocmock': + Var('flutter_git') + '/third_party/ocmock' + '@' + Var('ocmock_rev'), + + 'src/third_party/updater': + Var('updater_git') + '@' + Var('updater_rev'), + + 'src/flutter/third_party/libjpeg-turbo/src': + Var('flutter_git') + '/third_party/libjpeg-turbo' + '@' + '0fb821f3b2e570b2783a94ccd9a2fb1f4916ae9f', + + 'src/flutter/third_party/libpng': + Var('flutter_git') + '/third_party/libpng' + '@' + 'de36b892e921c684ef718fec24739ae9bb49c977', + + 'src/flutter/third_party/libwebp': + Var('chromium_git') + '/webm/libwebp.git' + '@' + 'ca332209cb5567c9b249c86788cb2dbf8847e760', # 1.3.2 + + 'src/flutter/third_party/wuffs': + Var('skia_git') + '/external/github.com/google/wuffs-mirror-release-c.git' + '@' + '600cd96cf47788ee3a74b40a6028b035c9fd6a61', + + 'src/flutter/third_party/zlib': + Var('chromium_git') + '/chromium/src/third_party/zlib.git' + '@' + '7d77fb7fd66d8a5640618ad32c71fdeb7d3e02df', + + 'src/flutter/third_party/cpu_features/src': + Var('chromium_git') + '/external/github.com/google/cpu_features.git' + '@' + '936b9ab5515dead115606559502e3864958f7f6e', + + 'src/flutter/third_party/inja': + Var('flutter_git') + '/third_party/inja' + '@' + '88bd6112575a80d004e551c98cf956f88ff4d445', + + 'src/flutter/third_party/libtess2': + Var('flutter_git') + '/third_party/libtess2' + '@' + '725e5e08ec8751477565f1d603fd7eb9058c277c', + + 'src/flutter/third_party/sqlite': + Var('flutter_git') + '/third_party/sqlite' + '@' + '0f61bd2023ba94423b4e4c8cfb1a23de1fe6a21c', + + 'src/flutter/third_party/pyyaml': + Var('flutter_git') + '/third_party/pyyaml.git' + '@' + '03c67afd452cdff45b41bfe65e19a2fb5b80a0e8', + + 'src/flutter/third_party/swiftshader': + Var('swiftshader_git') + '/SwiftShader.git' + '@' + '2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f', + + 'src/flutter/third_party/angle': + Var('chromium_git') + '/angle/angle.git' + '@' + '6a09e41ce6ea8c93524faae1a925eb01562f53b1', + + 'src/flutter/third_party/vulkan_memory_allocator': + Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator' + '@' + '7de5cc00de50e71a3aab22dea52fbb7ff4efceb6', + + 'src/flutter/third_party/abseil-cpp': + Var('flutter_git') + '/third_party/abseil-cpp.git' + '@' + 'ff6504dc527b25fef0f3c531e7dba0ed6b69c162', + + # Dart packages + 'src/flutter/third_party/pkg/archive': + Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + 'f1d164f8f5d8aea0be620a9b1e8d300b75a29388', # 3.6.1 + + 'src/flutter/third_party/pkg/coverage': + Var('flutter_git') + '/third_party/coverage.git' + '@' + 'bb0ab721ee4ceef1abfa413d8d6fd46013b583b9', # 1.7.2 + + 'src/flutter/third_party/pkg/equatable': + Var('flutter_git') + '/third_party/equatable.git' + '@' + '2117551ff3054f8edb1a58f63ffe1832a8d25623', # 2.0.5 + + 'src/flutter/third_party/pkg/flutter_packages': + Var('flutter_git') + '/mirrors/packages' + '@' + '25454e63851fe7933f04d025606e68c1eac4fe0f', # various + + 'src/flutter/third_party/pkg/gcloud': + Var('flutter_git') + '/third_party/gcloud.git' + '@' + 'a5276b85c4714378e84b1fb478b8feeeb686ac26', # 0.8.6-dev + + 'src/flutter/third_party/pkg/googleapis': + Var('flutter_git') + '/third_party/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various + + 'src/flutter/third_party/pkg/io': + Var('flutter_git') + '/third_party/io.git' + '@' + '997a6243aad20af4238147d9ec00bf638b9169af', # 1.0.5-wip + + 'src/flutter/third_party/pkg/node_preamble': + Var('flutter_git') + '/third_party/node_preamble.dart.git' + '@' + '47245865175929ec452d8058e563c267b64c3d64', # 2.0.2 + + 'src/flutter/third_party/pkg/platform': + Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0 + + 'src/flutter/third_party/pkg/process': + Var('dart_git') + '/process.dart' + '@' + '0c9aeac86dcc4e3a6cf760b76fed507107e244d5', # 4.2.1 + + 'src/flutter/third_party/pkg/process_runner': + Var('flutter_git') + '/third_party/process_runner.git' + '@' + 'f24c69efdcaf109168f23d381fa281453d2bc9b1', # 4.1.2 + + 'src/flutter/third_party/pkg/vector_math': + Var('dart_git') + '/external/github.com/google/vector_math.dart.git' + '@' + '0a5fd95449083d404df9768bc1b321b88a7d2eef', # 2.1.0 + + 'src/flutter/third_party/imgui': + Var('flutter_git') + '/third_party/imgui.git' + '@' + '3ea0fad204e994d669f79ed29dcaf61cd5cb571d', + + 'src/flutter/third_party/json': + Var('flutter_git') + '/third_party/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642', + + 'src/flutter/third_party/stb': + Var('flutter_git') + '/third_party/stb.git' + '@' + '5736b15f7ea0ffb08dd38af21067c314d6a3aae9', + + 'src/flutter/third_party/gradle': { + 'packages': [ + { + # See tools/gradle/README.md for update instructions. + # Version here means the CIPD tag. + 'version': 'version:8.9', + 'package': 'flutter/gradle' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd' + }, + + 'src/flutter/third_party/android_tools/trace_to_text': { + 'packages': [ + { + # 25.0 downloads for both mac-amd64 and mac-arm64 + # 26.1 is not found with either platform + # 27.1 is the latest release of perfetto + 'version': 'git_tag:v25.0', + 'package': 'perfetto/trace_to_text/${{platform}}' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd' + }, + + 'src/flutter/third_party/android_tools/google-java-format': { + 'packages': [ + { + 'package': 'flutter/android/google-java-format', + 'version': 'version:1.7-1' + } + ], + # We want to be able to format these as part of CI, and the CI step that + # checks formatting runs without downloading the rest of the Android build + # tooling. Therefore unlike all the other Android-related tools, we want to + # download this every time. + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/android_tools': { + 'packages': [ + { + 'package': 'flutter/android/sdk/all/${{platform}}', + 'version': 'version:35v1' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/android_embedding_dependencies': { + 'packages': [ + { + 'package': 'flutter/android/embedding_bundle', + 'version': 'last_updated:2024-09-10T16:32:16-0700' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/java/openjdk': { + 'packages': [ + { + 'package': 'flutter/java/openjdk/${{platform}}', + 'version': 'version:17' + } + ], + # Always download the JDK since java is required for running the formatter. + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/gn': { + 'packages': [ + { + 'package': 'gn/gn/${{platform}}', + 'version': 'git_revision:b79031308cc878488202beb99883ec1f2efd9a6d' + }, + ], + 'dep_type': 'cipd', + }, + 'src/flutter/third_party/ninja': { + 'packages': [ + { + 'package': 'infra/3pp/tools/ninja/${{platform}}', + 'version': 'version:2@1.11.1.chromium.4', + } + ], + 'dep_type': 'cipd', + }, + + 'src/flutter/prebuilts/emsdk': { + 'url': Var('skia_git') + '/external/github.com/emscripten-core/emsdk.git' + '@' + 'a896e3d066448b3530dbcaa48869fafefd738f57', + 'condition': 'download_emsdk', + }, + + # Clang on mac and linux are expected to typically be the same revision. + # They are separated out so that the autoroller can more easily manage them. + 'src/flutter/buildtools/mac-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/mac-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "mac"', # On ARM64 Macs too because Goma doesn't support the host-arm64 toolchain. + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/mac-arm64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/linux-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/linux-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "linux" or host_os == "mac"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/linux-arm64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/linux-arm64', + 'version': Var('clang_version'), + } + ], + 'condition': 'host_os == "linux" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/windows-x64/clang': { + 'packages': [ + { + 'package': 'fuchsia/third_party/clang/windows-amd64', + 'version': Var('clang_version'), + } + ], + 'condition': 'download_windows_deps', + 'dep_type': 'cipd', + }, + + # RBE binaries and configs. + 'src/flutter/buildtools/linux-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/windows-x64/reclient': { + 'packages': [ + { + 'package': 'infra/rbe/client/${{platform}}', + 'version': Var('reclient_version'), + } + ], + 'condition': 'use_rbe and download_windows_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/build/rbe': { + 'packages': [ + { + 'package': 'flutter_internal/rbe/reclient_cfgs', + 'version': 'XIomtC8MFuQrF9qI5xYcFfcfKXZTbcY6nL6NgF-pSRIC', + } + ], + 'condition': 'use_rbe', + 'dep_type': 'cipd', + }, + + # gcloud + 'src/flutter/buildtools/linux-x64/gcloud': { + 'packages': [ + { + 'package': 'infra/3pp/tools/gcloud/${{platform}}', + 'version': Var('gcloud_version'), + } + ], + 'condition': 'use_rbe and host_os == "linux" and host_cpu == "x64"', + 'dep_type': 'cipd', + }, + + 'src/flutter/buildtools/mac-arm64/gcloud': { + 'packages': [ + { + 'package': 'infra/3pp/tools/gcloud/${{platform}}', + 'version': Var('gcloud_version'), + } + ], + 'condition': 'use_rbe and host_os == "mac" and host_cpu == "arm64"', + 'dep_type': 'cipd', + }, + + # Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag + # Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag + 'src/fuchsia/sdk/linux': { + 'packages': [ + { + 'package': 'fuchsia/sdk/core/linux-amd64', + 'version': 'xGr5ZkxX3CajAY1xuiKc6s4B5nzYO_3YViIpBbQzrjIC' + } + ], + 'condition': 'download_fuchsia_deps and not download_fuchsia_sdk', + 'dep_type': 'cipd', + }, + + 'src/flutter/tools/fuchsia/test_scripts': { + 'packages': [ + { + 'package': 'chromium/fuchsia/test-scripts', + 'version': Var('fuchsia_test_scripts_version'), + } + ], + 'condition': 'download_fuchsia_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/tools/fuchsia/gn-sdk': { + 'packages': [ + { + 'package': 'chromium/fuchsia/gn-sdk', + 'version': Var('fuchsia_gn_sdk_version'), + } + ], + 'condition': 'download_fuchsia_deps', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/impeller-cmake-example': { + 'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + '9f8298ec31dcbebbf019bd487888166abf2f55e6', + 'condition': 'download_impeller_cmake_example', + }, + + # cmake is only used by impeller-cmake-example. + 'src/flutter/buildtools/mac-x64/cmake': { + 'packages': [ + { + 'package': 'infra/3pp/tools/cmake/mac-amd64', + 'version': 'CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC', + } + ], + 'condition': 'download_impeller_cmake_example and host_os == "mac"', + 'dep_type': 'cipd', + }, + + 'src/flutter/third_party/google_fonts_for_unit_tests': { + 'packages': [ + { + 'package': 'flutter/flutter_font_fallbacks', + 'version': 'c81f5a2b369b48df3728d2b247a27901bb76bbce0c40b343fe1cc924a36b36ea' + } + ], + 'dep_type': 'cipd', + } +} + +recursedeps = [ + "src/flutter/third_party/vulkan-deps", +] + +hooks = [ + { + # Generate the Dart SDK's .dart_tool/package_confg.json file. + "name": "Generate .dart_tool/package_confg.json", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_package_config.py", + ], + }, + { + # Generate the sdk/version file. + "name": "Generate sdk/version", + "pattern": ".", + "action": [ + "python3", + "src/flutter/third_party/dart/tools/generate_sdk_version_file.py", + ], + }, + { + # Update the Windows toolchain if necessary. + "name": "win_toolchain", + "condition": "download_windows_deps", + "pattern": ".", + "action": ["python3", "src/build/vs_toolchain.py", "update"], + }, + { + "name": "dia_dll", + "pattern": ".", + "condition": "download_windows_deps", + "action": [ + "python3", + "src/flutter/tools/dia_dll.py", + ], + }, + { + "name": "linux_sysroot_x64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=x64", + ], + }, + { + "name": "linux_sysroot_arm64", + "pattern": ".", + "condition": "download_linux_deps", + "action": [ + "python3", + "src/build/linux/sysroot_scripts/install-sysroot.py", + "--arch=arm64", + ], + }, + { + "name": "pub get --offline", + "pattern": ".", + "action": [ + "python3", + "src/flutter/tools/pub_get_offline.py", + ], + }, + { + "name": "Download Fuchsia SDK", + "pattern": ".", + "condition": "download_fuchsia_deps and download_fuchsia_sdk", + "action": [ + "python3", + "src/flutter/tools/download_fuchsia_sdk.py", + "--fail-loudly", + "--verbose", + "--host-os", + Var("host_os"), + "--fuchsia-sdk-path", + Var("fuchsia_sdk_path"), + ], + }, + { + "name": "Activate Emscripten SDK", + "pattern": ".", + "condition": "download_emsdk", + "action": [ + "python3", + "src/flutter/tools/activate_emsdk.py", + ], + }, + { + "name": "Setup githooks", + "pattern": ".", + "condition": "setup_githooks", + "action": [ + "python3", + "src/flutter/tools/githooks/setup.py", + ], + }, + { + "name": "impeller-cmake-example submodules", + "pattern": ".", + "condition": "download_impeller_cmake_example", + "action": [ + "python3", + "src/flutter/ci/impeller_cmake_build_test.py", + "--path", + "flutter/third_party/impeller-cmake-example", + "--setup", + ], + }, + { + "name": "Download Fuchsia system images", + "pattern": ".", + "condition": "run_fuchsia_emu", + "action": [ + "env", + "DOWNLOAD_FUCHSIA_SDK={download_fuchsia_sdk}", + "FUCHSIA_SDK_PATH={fuchsia_sdk_path}", + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/update_product_bundles.py", + "terminal.x64,terminal.qemu-arm64", + ], + }, + # The following two scripts check if they are running in the LUCI + # environment, and do nothing if so. This is because Xcode is not yet + # installed in CI when these hooks are run. + { + "name": "Find the iOS device SDKs", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/config/ios/ios_sdk.py", + # This cleans up entries under flutter/prebuilts for this script and the + # following script. + "--as-gclient-hook", + ], + }, + { + "name": "Find the macOS SDK", + "pattern": ".", + "condition": 'host_os == "mac"', + "action": [ + "python3", + "src/build/mac/find_sdk.py", + "--as-gclient-hook", + Var("mac_sdk_min"), + ], + }, + { + "name": "Generate Fuchsia GN build rules", + "pattern": ".", + "condition": "download_fuchsia_deps", + "action": [ + "python3", + "src/flutter/tools/fuchsia/with_envs.py", + "src/flutter/tools/fuchsia/test_scripts/gen_build_defs.py", + ], + }, +] From 1c622d2bcafd95dd304a9fc40ddab8a782a92f36 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 15:35:50 -0500 Subject: [PATCH 42/50] Remove extra include of updater.lib --- shell/common/BUILD.gn | 7 ------- 1 file changed, 7 deletions(-) diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 390a7b97f306c..5e4b4d1f2c6f8 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -172,13 +172,6 @@ source_set("common") { "//third_party/updater/target/x86_64-apple-darwin/release/libupdater.a", ] } - } else if (host_os == "win" && target_os == "win") { - if (target_cpu == "x64") { - libs = [ - "userenv.lib", - "//third_party/updater/target/x86_64-pc-windows-msvc/release/updater.lib", - ] - } } } From a699821ab64f1ee777be7a360b91bfc798622d18 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 15:54:30 -0500 Subject: [PATCH 43/50] Cleanup --- shell/common/shorebird/shorebird.cc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 498d0dfb19d7b..903acb3c5d82a 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -83,16 +83,6 @@ FileCallbacks ShorebirdFileCallbacks() { // FIXME: consolidate this with the other ConfigureShorebird bool ConfigureShorebird(const ShorebirdConfigArgs& args, std::string* patch_path) { - // FIXME: This was commented out because the windows flutter engine does not - // populate the settings snapshots. Ideally we would call - // ConfigureShorebird from the embedder and this would be uncommented. - // If you are crashing here, you probably are running Shorebird in a Debug - // config, where the AOT snapshot won't be linked into the process, and thus - // lookups will fail. Change your Scheme to Release to fix: - // https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-ios-builds-with-xcode - // FML_CHECK(DartSnapshot::VMSnapshotFromSettings(settings)) - // << "XCode Scheme must be set to Release to use Shorebird"; - auto shorebird_updater_dir_name = "shorebird_updater"; auto code_cache_dir = fml::paths::JoinPaths( @@ -119,10 +109,6 @@ bool ConfigureShorebird(const ShorebirdConfigArgs& args, // https://stackoverflow.com/questions/26032039/convert-vectorstring-into-char-c std::vector c_paths{}; c_paths.push_back(args.release_app_library_path.c_str()); - // for (const auto& string : settings.application_library_path) { - // FML_LOG(INFO) << "Pushing " << string << " to c_paths"; - // c_paths.push_back(string.c_str()); - // } // Do not modify application_library_path or c_strings will invalidate. app_parameters.original_libapp_paths = c_paths.data(); From 32bd681c03d6e5da914916a32379a08ed103ff9a Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 16:19:59 -0500 Subject: [PATCH 44/50] cleanup --- common/config.gni | 4 ++++ shell/common/shell.cc | 2 +- shell/common/shorebird/shorebird.cc | 17 ++++++++--------- shell/common/shorebird/shorebird.h | 6 +++--- .../platform/windows/flutter_windows_engine.cc | 8 +++----- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/common/config.gni b/common/config.gni index 0a5a95306c2fd..66d300d99670d 100644 --- a/common/config.gni +++ b/common/config.gni @@ -73,6 +73,10 @@ if (slimpeller) { feature_defines_list += [ "SLIMPELLER=1" ] } +if (is_ios || is_mac || is_android || is_win) { + feature_defines_list += [ "SHOREBIRD_PLATFORM_SUPPORTED=1" ] +} + if (is_ios || is_mac) { flutter_cflags_objc = [ "-Werror=overriding-method-mismatch", diff --git a/shell/common/shell.cc b/shell/common/shell.cc index ffb2e6a32fc25..9e626a95b6db7 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -444,7 +444,7 @@ Shell::Shell(DartVMRef vm, weak_factory_gpu_(nullptr), weak_factory_(this) { // FIXME: This is probably the wrong place to hook into. -#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_MACOSX || FML_OS_WIN +#if SHOREBIRD_PLATFORM_SUPPORTED if (!vm_) { shorebird_report_launch_failure(); } else { diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 903acb3c5d82a..5b627af520401 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -82,7 +82,8 @@ FileCallbacks ShorebirdFileCallbacks() { // FIXME: consolidate this with the other ConfigureShorebird bool ConfigureShorebird(const ShorebirdConfigArgs& args, - std::string* patch_path) { + std::string& patch_path) { + patch_path = args.release_app_library_path; auto shorebird_updater_dir_name = "shorebird_updater"; auto code_cache_dir = fml::paths::JoinPaths( @@ -133,11 +134,10 @@ bool ConfigureShorebird(const ShorebirdConfigArgs& args, FML_LOG(INFO) << "Checking for active patch"; char* c_active_path = shorebird_next_boot_patch_path(); - std::string active_path; if (c_active_path != NULL) { - active_path = c_active_path; + patch_path = c_active_path; shorebird_free_string(c_active_path); - FML_LOG(INFO) << "Shorebird updater: patch path: " << active_path; + FML_LOG(INFO) << "Shorebird updater: patch path: " << patch_path; } else { FML_LOG(INFO) << "Shorebird updater: no active patch."; } @@ -153,7 +153,7 @@ bool ConfigureShorebird(const ShorebirdConfigArgs& args, // initialized but never run before the app is quit, could still cause us to // suddenly mark-bad a patch that was never actually attempted to launch. if (!init_result) { - return -1; + return false; } // Once start_update_thread is called, the next_boot_patch* functions may @@ -168,13 +168,12 @@ bool ConfigureShorebird(const ShorebirdConfigArgs& args, FML_LOG(INFO) << "Shorebird auto_update disabled, not checking for updates."; } - - *patch_path = active_path; - return kSuccess; + + return true; } void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, - flutter::Settings& settings) { + Settings& settings) { // cache_path is used for both code_cache and app_storage, as we don't persist // any data between releases. args.app_path is appended to // the settings.application_library_path vector at this function's call site. diff --git a/shell/common/shorebird/shorebird.h b/shell/common/shorebird/shorebird.h index 2a04515228714..b4efa4c28321b 100644 --- a/shell/common/shorebird/shorebird.h +++ b/shell/common/shorebird/shorebird.h @@ -31,14 +31,14 @@ struct ShorebirdConfigArgs { }; bool ConfigureShorebird(const ShorebirdConfigArgs& args, - std::string* patch_path); + std::string& patch_path); void ConfigureShorebird(const ShorebirdFlutterProjectArgs& args, - flutter::Settings& settings); + Settings& settings); void ConfigureShorebird(std::string code_cache_path, std::string app_storage_path, - flutter::Settings& settings, + Settings& settings, const std::string& shorebird_yaml, const std::string& version, const std::string& version_code); diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 9f7c5374a061d..da4d51418a8ae 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -330,13 +330,11 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { << "Failed to retrieve the release version and build number."; } - flutter::ShorebirdConfigArgs shorebird_args = - flutter::ShorebirdConfigArgs(code_cache_path, code_cache_path, app_path, + ShorebirdConfigArgs shorebird_args(code_cache_path, code_cache_path, app_path, shorebird_yaml_contents, release_version); std::string patch_path; - auto configure_result = - flutter::ConfigureShorebird(shorebird_args, &patch_path); - if (configure_result == kSuccess) { + auto configure_result = ConfigureShorebird(shorebird_args, patch_path); + if (configure_result) { // If we have a patch installed, we replace the default AOT library path // with the patch path here. FML_LOG(INFO) << "Setting project patch path: " << patch_path; From 6e09a4a4a9ac4683e415087ef2b70151f94ace8a Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 16:21:20 -0500 Subject: [PATCH 45/50] Formatting --- shell/common/shorebird/shorebird.cc | 2 +- shell/platform/windows/flutter_windows_engine.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/common/shorebird/shorebird.cc b/shell/common/shorebird/shorebird.cc index 5b627af520401..77608a0e29563 100644 --- a/shell/common/shorebird/shorebird.cc +++ b/shell/common/shorebird/shorebird.cc @@ -168,7 +168,7 @@ bool ConfigureShorebird(const ShorebirdConfigArgs& args, FML_LOG(INFO) << "Shorebird auto_update disabled, not checking for updates."; } - + return true; } diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index da4d51418a8ae..84d99a717cf09 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -330,8 +330,9 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { << "Failed to retrieve the release version and build number."; } - ShorebirdConfigArgs shorebird_args(code_cache_path, code_cache_path, app_path, - shorebird_yaml_contents, release_version); + ShorebirdConfigArgs shorebird_args(code_cache_path, code_cache_path, + app_path, shorebird_yaml_contents, + release_version); std::string patch_path; auto configure_result = ConfigureShorebird(shorebird_args, patch_path); if (configure_result) { From f98353fa41f47f7ce260c42adecf16e9fadea3da Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 16:41:33 -0500 Subject: [PATCH 46/50] Use ERROR_SUCCESS --- shell/platform/windows/flutter_windows_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 84d99a717cf09..d90c64ab5cef1 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -247,7 +247,7 @@ bool FlutterWindowsEngine::Run() { int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { char module_path[MAX_PATH]; // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, module_path, MAX_PATH) == -1) { + if (GetModuleFileNameA(NULL, module_path, MAX_PATH) != ERROR_SUCCESS) { return -1; } From 99a17eda8b4ce397811dee43e1a280a8170cd525 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 16:44:59 -0500 Subject: [PATCH 47/50] Do not use Error Success --- shell/platform/windows/flutter_windows_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index d90c64ab5cef1..84d99a717cf09 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -247,7 +247,7 @@ bool FlutterWindowsEngine::Run() { int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { char module_path[MAX_PATH]; // Get the full path of the currently running executable - if (GetModuleFileNameA(NULL, module_path, MAX_PATH) != ERROR_SUCCESS) { + if (GetModuleFileNameA(NULL, module_path, MAX_PATH) == -1) { return -1; } From 2595ff1969daf8d3a6c2eda616c44b34d0b59866 Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 16:45:25 -0500 Subject: [PATCH 48/50] Add comment --- shell/platform/windows/flutter_windows_engine.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 84d99a717cf09..6c323913c7a75 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -246,7 +246,9 @@ bool FlutterWindowsEngine::Run() { int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { char module_path[MAX_PATH]; - // Get the full path of the currently running executable + // Get the full path of the currently running executable. The return value is + // the size of the string that was copied to the buffer, with -1 indicating + // failure. if (GetModuleFileNameA(NULL, module_path, MAX_PATH) == -1) { return -1; } From 4c34dd71aa685ab56bd53982895db5ecfc4d078e Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 17:11:49 -0500 Subject: [PATCH 49/50] GetLocalAppDataPath feedback --- .../windows/flutter_windows_engine.cc | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 6c323913c7a75..3a2889199d0e4 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -261,16 +262,17 @@ int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { } // Allocate memory for version info - std::vector version_data(version_info_size); + // std::vector version_data(version_info_size); + std::unique_ptr version_data(new char[version_info_size]); if (!GetFileVersionInfoA(module_path, handle, version_info_size, - version_data.data())) { + version_data.get())) { return -1; } // Get the version info structure VS_FIXEDFILEINFO* file_info = nullptr; UINT file_info_size = -1; - if (!VerQueryValueA(version_data.data(), "\\", + if (!VerQueryValueA(version_data.get(), "\\", reinterpret_cast(&file_info), &file_info_size)) { return -1; } @@ -292,20 +294,20 @@ int GetReleaseVersionAndBuildNumber(ReleaseVersion* release_version) { return -1; } -std::string GetLocalAppDataPath() { +bool GetLocalAppDataPath(std::string& outPath) { PWSTR path = nullptr; HRESULT result = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &path); - if (SUCCEEDED(result)) { - std::wstring widePath(path); - std::string localAppDataPath(widePath.begin(), widePath.end()); - // The calling process is responsible for freeing this resource - // https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath - CoTaskMemFree(path); - return localAppDataPath; - } else { - FML_LOG(ERROR) << "Failed to retrieve the local AppData directory."; - return ""; + if (!SUCCEEDED(result)) { + return false; } + + std::wstring widePath(path); + std::string localAppDataPath(widePath.begin(), widePath.end()); + // The calling process is responsible for freeing this resource + // https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath + CoTaskMemFree(path); + outPath = localAppDataPath; + return true; } bool FlutterWindowsEngine::Run(std::string_view entrypoint) { @@ -320,7 +322,11 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto shorebird_yaml_contents = std::string(""); if (filesystem::ReadFileToString(shorebird_yaml_path, &shorebird_yaml_contents)) { - auto code_cache_path = GetLocalAppDataPath(); + std::string code_cache_path; + if (!GetLocalAppDataPath(code_cache_path)) { + FML_LOG(ERROR) << "Failed to retrieve the local AppData directory."; + } + auto executable_location = fml::paths::GetExecutableDirectoryPath().second; auto app_path = fml::paths::JoinPaths({executable_location, "data", "app.so"}); From 636fd08fa729d42fcaaf6e74de4c462fb00e249a Mon Sep 17 00:00:00 2001 From: "BOLTMAN-WINDOWS\\bryan" Date: Fri, 3 Jan 2025 17:24:50 -0500 Subject: [PATCH 50/50] Refactor --- .../windows/flutter_windows_engine.cc | 81 +++++++++++-------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index 3a2889199d0e4..c6cff1b63b53d 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include "flutter/fml/logging.h" #include "flutter/fml/paths.h" @@ -310,47 +311,57 @@ bool GetLocalAppDataPath(std::string& outPath) { return true; } -bool FlutterWindowsEngine::Run(std::string_view entrypoint) { - if (!project_->HasValidPaths()) { - FML_LOG(ERROR) << "Missing or unresolvable paths to assets."; +bool SetUpShorebird(std::string assets_path_string, std::string& patch_path) { + auto shorebird_yaml_path = + fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); + std::string shorebird_yaml_contents(""); + if (!filesystem::ReadFileToString(shorebird_yaml_path, + &shorebird_yaml_contents)) { + FML_LOG(ERROR) << "Failed to read shorebird.yaml."; return false; } + + std::string code_cache_path; + if (!GetLocalAppDataPath(code_cache_path)) { + FML_LOG(ERROR) << "Failed to retrieve the local AppData directory."; + return false; + } + + auto executable_location = fml::paths::GetExecutableDirectoryPath().second; + auto app_path = + fml::paths::JoinPaths({executable_location, "data", "app.so"}); + ReleaseVersion release_version; + auto release_version_result = + GetReleaseVersionAndBuildNumber(&release_version); + if (release_version_result != kSuccess) { + FML_LOG(ERROR) + << "Failed to retrieve the release version and build number."; + return false; + } + + ShorebirdConfigArgs shorebird_args(code_cache_path, code_cache_path, app_path, + shorebird_yaml_contents, release_version); + return ConfigureShorebird(shorebird_args, patch_path); +} + +bool FlutterWindowsEngine::Run(std::string_view entrypoint) { std::string assets_path_string = project_->assets_path().u8string(); std::string icu_path_string = project_->icu_path().u8string(); - auto shorebird_yaml_path = - fml::paths::JoinPaths({assets_path_string, "shorebird.yaml"}); - auto shorebird_yaml_contents = std::string(""); - if (filesystem::ReadFileToString(shorebird_yaml_path, - &shorebird_yaml_contents)) { - std::string code_cache_path; - if (!GetLocalAppDataPath(code_cache_path)) { - FML_LOG(ERROR) << "Failed to retrieve the local AppData directory."; - } - auto executable_location = fml::paths::GetExecutableDirectoryPath().second; - auto app_path = - fml::paths::JoinPaths({executable_location, "data", "app.so"}); - ReleaseVersion release_version; - auto release_version_result = - GetReleaseVersionAndBuildNumber(&release_version); - if (release_version_result != kSuccess) { - FML_LOG(ERROR) - << "Failed to retrieve the release version and build number."; - } + if (!project_->HasValidPaths()) { + FML_LOG(ERROR) << "Missing or unresolvable paths to assets."; + return false; + } - ShorebirdConfigArgs shorebird_args(code_cache_path, code_cache_path, - app_path, shorebird_yaml_contents, - release_version); - std::string patch_path; - auto configure_result = ConfigureShorebird(shorebird_args, patch_path); - if (configure_result) { - // If we have a patch installed, we replace the default AOT library path - // with the patch path here. - FML_LOG(INFO) << "Setting project patch path: " << patch_path; - project_->SetAotLibraryPath(patch_path); - } else { - FML_LOG(ERROR) << "Failed to configure Shorebird."; - } + std::string patch_path; + auto setup_shorebird_result = SetUpShorebird(assets_path_string, patch_path); + if (setup_shorebird_result) { + // If we have a patch installed, we replace the default AOT library path + // with the patch path here. + FML_LOG(INFO) << "Setting project patch path: " << patch_path; + project_->SetAotLibraryPath(patch_path); + } else { + FML_LOG(ERROR) << "Failed to configure Shorebird."; } // This loads AOT data from the project_'s aot_library_path_.