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 () {
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"
fi
# The exit here is duplicitous since the function is run in a subshell,
......
......@@ -152,7 +152,7 @@ GOTO :after_subroutine
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" (
ECHO Error: Unable to create dart snapshot for flutter tool.
SET exit_code=%ERRORLEVEL%
......
......@@ -181,7 +181,6 @@ Future<void> _runToolTests() async {
await _buildRunnerTest(
path.join(flutterRoot, 'packages', 'flutter_tools'),
flutterRoot,
enableFlutterToolAsserts: true,
tableData: bigqueryApi?.tabledata,
);
......
......@@ -38,6 +38,7 @@ import 'src/commands/shell_completion.dart';
import 'src/commands/stop.dart';
import 'src/commands/test.dart';
import 'src/commands/trace.dart';
import 'src/commands/train.dart';
import 'src/commands/update_packages.dart';
import 'src/commands/upgrade.dart';
import 'src/commands/version.dart';
......@@ -84,6 +85,7 @@ Future<void> main(List<String> args) async {
StopCommand(),
TestCommand(verboseHelp: verboseHelp),
TraceCommand(),
TrainingCommand(),
UpdatePackagesCommand(hidden: !verboseHelp),
UpgradeCommand(),
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