Commit ce9fcb02 authored by Devon Carew's avatar Devon Carew Committed by GitHub

remove the resident cli option (#5263)

parent 84cbefe2
......@@ -12,7 +12,7 @@ import '../build_info.dart';
import '../cache.dart';
import '../device.dart';
import '../globals.dart';
import '../hot.dart' as hot;
import '../hot.dart';
import '../observatory.dart';
import '../resident_runner.dart';
import '../run.dart';
......@@ -57,15 +57,11 @@ class RunCommand extends RunCommandBase {
help: 'Listen to the given port for a debug connection (defaults to $kDefaultObservatoryPort).');
usesPubOption();
argParser.addFlag('resident',
defaultsTo: true,
help: 'Don\'t terminate the \'flutter run\' process after starting the application.');
// Option to enable hot reloading.
argParser.addFlag('hot',
negatable: false,
defaultsTo: false,
help: 'Run with support for hot reloading. Requires resident.');
help: 'Run with support for hot reloading.');
// Hidden option to enable a benchmarking mode. This will run the given
// application, measure the startup time and the app restart time, write the
......@@ -133,39 +129,23 @@ class RunCommand extends RunCommandBase {
}
}
if (argResults['resident']) {
if (argResults['hot']) {
hot.HotRunner runner = new hot.HotRunner(
deviceForCommand,
target: targetFile,
debuggingOptions: options
);
return runner.run(route: route);
} else {
RunAndStayResident runner = new RunAndStayResident(
deviceForCommand,
target: targetFile,
debuggingOptions: options
);
return runner.run(
traceStartup: traceStartup,
benchmark: argResults['benchmark'],
route: route
);
}
if (argResults['hot']) {
HotRunner runner = new HotRunner(
deviceForCommand,
target: targetFile,
debuggingOptions: options
);
return runner.run(route: route);
} else {
// TODO(devoncarew): Remove this path and support the `--no-resident` option
// using the `RunAndStayResident` class.
return startApp(
RunAndStayResident runner = new RunAndStayResident(
deviceForCommand,
target: targetFile,
stop: argResults['full-restart'],
install: true,
debuggingOptions: options,
debuggingOptions: options
);
return runner.run(
traceStartup: traceStartup,
benchmark: argResults['benchmark'],
route: route,
buildMode: getBuildMode()
route: route
);
}
}
......
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