From ee494ad4dd469be5d41b57d298a90317914aca03 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 02:27:25 +0000 Subject: [PATCH] Reverts "Manual Dart roll to 0ac840ba1 and update frontend server snapshot filename (#51921)" (flutter/engine#51927) Reverts: flutter/engine#51921 Initiated by: zanderso Reason for reverting: This Dart roll is blocking the roll of the engine to the framework. Unblocking the rolls depends on addressing https://github.com/flutter/flutter/issues/146164. Original PR Author: jason-simmons Reviewed By: {zanderso, jonahwilliams} This change reverts the following previous change: The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100) --- DEPS | 2 +- engine/src/flutter/build/archives/BUILD.gn | 4 ++-- engine/src/flutter/build/dart/rules.gni | 5 ++--- engine/src/flutter/flutter_frontend_server/BUILD.gn | 9 +++++---- .../flutter_frontend_server/test/to_string_test.dart | 5 ++--- engine/src/flutter/shell/platform/fuchsia/BUILD.gn | 2 +- engine/src/flutter/testing/run_tests.py | 4 ++-- .../tools/const_finder/test/const_finder_test.dart | 3 +-- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/DEPS b/DEPS index 572e78f738..2d92f83ee3 100644 --- a/DEPS +++ b/DEPS @@ -62,7 +62,7 @@ vars = { # 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': '0ac840ba1f0bf840f9f3e4859003e68324f3fd3b', + 'dart_revision': '5b812b9ec2204cf6ae1a9e8204faa22b69ce8ace', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/engine/src/flutter/build/archives/BUILD.gn b/engine/src/flutter/build/archives/BUILD.gn index 38637ad223..fb7f8294ad 100644 --- a/engine/src/flutter/build/archives/BUILD.gn +++ b/engine/src/flutter/build/archives/BUILD.gn @@ -108,8 +108,8 @@ if (build_engine_artifacts && !is_android) { destination = "vm_isolate_snapshot.bin" }, { - source = "$root_gen_dir/frontend_server_aot.dart.snapshot" - destination = "frontend_server_aot.dart.snapshot" + source = "$root_gen_dir/frontend_server.dart.snapshot" + destination = "frontend_server.dart.snapshot" }, ] } diff --git a/engine/src/flutter/build/dart/rules.gni b/engine/src/flutter/build/dart/rules.gni index c8242de63a..ec70bac7bc 100644 --- a/engine/src/flutter/build/dart/rules.gni +++ b/engine/src/flutter/build/dart/rules.gni @@ -94,10 +94,9 @@ template("flutter_frontend_server") { if (is_win) { ext = ".exe" } - dart = rebase_path("$host_prebuilt_dart_sdk/bin/dartaotruntime$ext", - root_out_dir) + dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir) frontend_server = - rebase_path("$root_gen_dir/frontend_server_aot.dart.snapshot") + rebase_path("$root_gen_dir/frontend_server.dart.snapshot") args = [ dart ] + common_vm_args + [ frontend_server ] + common_args } diff --git a/engine/src/flutter/flutter_frontend_server/BUILD.gn b/engine/src/flutter/flutter_frontend_server/BUILD.gn index 7d7f0c2027..9ba5ee2713 100644 --- a/engine/src/flutter/flutter_frontend_server/BUILD.gn +++ b/engine/src/flutter/flutter_frontend_server/BUILD.gn @@ -7,12 +7,13 @@ import("//flutter/common/config.gni") copy("frontend_server") { if (flutter_prebuilt_dart_sdk) { - snapshot = "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server_aot.dart.snapshot" + snapshot = + "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot" } else { - deps = [ "$dart_src/utils/kernel-service:frontend_server_aot" ] - snapshot = "$root_out_dir/frontend_server_aot.dart.snapshot" + deps = [ "$dart_src/utils/kernel-service:frontend_server" ] + snapshot = "$root_out_dir/frontend_server.dart.snapshot" } sources = [ snapshot ] - outputs = [ "$root_gen_dir/frontend_server_aot.dart.snapshot" ] + outputs = [ "$root_gen_dir/frontend_server.dart.snapshot" ] } diff --git a/engine/src/flutter/flutter_frontend_server/test/to_string_test.dart b/engine/src/flutter/flutter_frontend_server/test/to_string_test.dart index 2cd8935949..ded3b98362 100644 --- a/engine/src/flutter/flutter_frontend_server/test/to_string_test.dart +++ b/engine/src/flutter/flutter_frontend_server/test/to_string_test.dart @@ -16,7 +16,6 @@ Future main(List args) async { } final String dart = Platform.resolvedExecutable; - final String dartaotruntime = path.join(path.dirname(Platform.resolvedExecutable), 'dartaotruntime'); final String buildDir = args[0]; final String frontendServer = args[1]; final String sdkRoot = args[2]; @@ -36,7 +35,7 @@ Future main(List args) async { } test('Without flag', () { - checkProcessResult(Process.runSync(dartaotruntime, [ + checkProcessResult(Process.runSync(dart, [ frontendServer, '--sdk-root=$sdkRoot', '--target=flutter', @@ -60,7 +59,7 @@ Future main(List args) async { }); test('With flag', () { - checkProcessResult(Process.runSync(dartaotruntime, [ + checkProcessResult(Process.runSync(dart, [ frontendServer, '--sdk-root=$sdkRoot', '--target=flutter', diff --git a/engine/src/flutter/shell/platform/fuchsia/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/BUILD.gn index 12a22f3532..4de6e16a88 100644 --- a/engine/src/flutter/shell/platform/fuchsia/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/BUILD.gn @@ -60,7 +60,7 @@ fuchsia_host_bundle("dart_binaries") { _frontend_server_path = rebase_path(get_label_info(_frontend_server_label, "root_gen_dir") + - "/frontend_server_aot.dart.snapshot") + "/frontend_server.dart.snapshot") _list_libraries_path = rebase_path(get_label_info(_list_libraries_label, "root_gen_dir") + diff --git a/engine/src/flutter/testing/run_tests.py b/engine/src/flutter/testing/run_tests.py index dc04e6d984..9ec10f57e2 100755 --- a/engine/src/flutter/testing/run_tests.py +++ b/engine/src/flutter/testing/run_tests.py @@ -932,7 +932,7 @@ def build_dart_host_test_list(build_dir): os.path.join('flutter', 'flutter_frontend_server'), [ build_dir, - os.path.join(build_dir, 'gen', 'frontend_server_aot.dart.snapshot'), + os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), os.path.join(build_dir, 'flutter_patched_sdk') ], ), @@ -949,7 +949,7 @@ def build_dart_host_test_list(build_dir): ( os.path.join('flutter', 'tools', 'const_finder'), [ - os.path.join(build_dir, 'gen', 'frontend_server_aot.dart.snapshot'), + os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'), os.path.join(build_dir, 'flutter_patched_sdk'), os.path.join(build_dir, 'dart-sdk', 'lib', 'libraries.json'), ], diff --git a/engine/src/flutter/tools/const_finder/test/const_finder_test.dart b/engine/src/flutter/tools/const_finder/test/const_finder_test.dart index 0731b17b8d..18e237fd7c 100644 --- a/engine/src/flutter/tools/const_finder/test/const_finder_test.dart +++ b/engine/src/flutter/tools/const_finder/test/const_finder_test.dart @@ -45,7 +45,6 @@ void expectInstances(dynamic value, dynamic expected, Compiler compiler) { // This test is assuming the `dart` used to invoke the tests is compatible // with the version of package:kernel in //third-party/dart/pkg/kernel final String dart = Platform.resolvedExecutable; -final String dartaotruntime = path.join(path.dirname(Platform.resolvedExecutable), 'dartaotruntime'); void _checkRecursion(String dillPath, Compiler compiler) { stdout.writeln('Checking recursive calls.'); @@ -444,7 +443,7 @@ class _Test { } void _compileAOTDill() { - checkProcessResult(Process.runSync(dartaotruntime, [ + checkProcessResult(Process.runSync(dart, [ frontendServer, '--sdk-root=$sdkRoot', '--target=flutter',