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