Unverified Commit 72605d24 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Switch flutter_tools from script to app-jit snapshot. (#27749)

parent 23326db7
...@@ -121,7 +121,7 @@ function upgrade_flutter () { ...@@ -121,7 +121,7 @@ function upgrade_flutter () {
retry_upgrade retry_upgrade
"$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" "$DART" --snapshot="$SNAPSHOT_PATH" --snapshot-kind=app-jit --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" training
echo "$revision" > "$STAMP_PATH" echo "$revision" > "$STAMP_PATH"
fi fi
# The exit here is duplicitous since the function is run in a subshell, # The exit here is duplicitous since the function is run in a subshell,
......
...@@ -152,7 +152,7 @@ GOTO :after_subroutine ...@@ -152,7 +152,7 @@ GOTO :after_subroutine
POPD POPD
"%dart%" --snapshot="%snapshot_path%" --packages="%flutter_tools_dir%\.packages" "%script_path%" "%dart%" --snapshot="%snapshot_path%" --snapshot-kind=app-jit --packages="%flutter_tools_dir%\.packages" "%script_path%"
IF "%ERRORLEVEL%" NEQ "0" ( IF "%ERRORLEVEL%" NEQ "0" (
ECHO Error: Unable to create dart snapshot for flutter tool. ECHO Error: Unable to create dart snapshot for flutter tool.
SET exit_code=%ERRORLEVEL% SET exit_code=%ERRORLEVEL%
......
...@@ -181,7 +181,6 @@ Future<void> _runToolTests() async { ...@@ -181,7 +181,6 @@ Future<void> _runToolTests() async {
await _buildRunnerTest( await _buildRunnerTest(
path.join(flutterRoot, 'packages', 'flutter_tools'), path.join(flutterRoot, 'packages', 'flutter_tools'),
flutterRoot, flutterRoot,
enableFlutterToolAsserts: true,
tableData: bigqueryApi?.tabledata, tableData: bigqueryApi?.tabledata,
); );
...@@ -713,4 +712,4 @@ Future<void> _integrationTestsAndroidSdk() async { ...@@ -713,4 +712,4 @@ Future<void> _integrationTestsAndroidSdk() async {
} }
// note: this also covers plugin_test_win as long as Windows has an Android SDK available. // note: this also covers plugin_test_win as long as Windows has an Android SDK available.
await _runDevicelabTest('plugin_test', env: env); await _runDevicelabTest('plugin_test', env: env);
} }
\ No newline at end of file
...@@ -38,6 +38,7 @@ import 'src/commands/shell_completion.dart'; ...@@ -38,6 +38,7 @@ import 'src/commands/shell_completion.dart';
import 'src/commands/stop.dart'; import 'src/commands/stop.dart';
import 'src/commands/test.dart'; import 'src/commands/test.dart';
import 'src/commands/trace.dart'; import 'src/commands/trace.dart';
import 'src/commands/train.dart';
import 'src/commands/update_packages.dart'; import 'src/commands/update_packages.dart';
import 'src/commands/upgrade.dart'; import 'src/commands/upgrade.dart';
import 'src/commands/version.dart'; import 'src/commands/version.dart';
...@@ -84,6 +85,7 @@ Future<void> main(List<String> args) async { ...@@ -84,6 +85,7 @@ Future<void> main(List<String> args) async {
StopCommand(), StopCommand(),
TestCommand(verboseHelp: verboseHelp), TestCommand(verboseHelp: verboseHelp),
TraceCommand(), TraceCommand(),
TrainingCommand(),
UpdatePackagesCommand(hidden: !verboseHelp), UpdatePackagesCommand(hidden: !verboseHelp),
UpgradeCommand(), UpgradeCommand(),
VersionCommand(), VersionCommand(),
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '../runner/flutter_command.dart';
/// This command is run when generating the app-jit snapshot for the tool, so it cannot access the Cache
/// or any artifacts that haven't been downloaded yet.
class TrainingCommand extends FlutterCommand {
@override
String get description => 'training run for app-jit snapshot';
@override
String get name => 'training';
@override
bool get hidden => true;
@override
bool get shouldUpdateCache => false;
@override
Future<FlutterCommandResult> runCommand() async {
// This command does not do anything yet :).
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment