Add experimental hot reload flag support to flutter tools (#162889)
Rather than ask users to pass the complicated and long string `--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc` we want a simpler flag to enable the new DDC module system/hot reload. Technically this flag enables the new module system, not necessarily hot reload directly. But we only expect people to use the flag to enable hot reload so I've chosen the name based on that. --------- Co-authored-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
@@ -11,9 +11,7 @@ import '../src/common.dart';
|
||||
void main() {
|
||||
testAll(
|
||||
chrome: true,
|
||||
additionalCommandArgs: <String>[
|
||||
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
|
||||
],
|
||||
additionalCommandArgs: <String>['--web-experimental-hot-reload'],
|
||||
// TODO(srujzs): Remove this custom message once we have the delta inspector emitting the same
|
||||
// string as the VM.
|
||||
constClassFieldRemovalErrorMessage: 'Const class cannot remove fields',
|
||||
|
||||
@@ -9,10 +9,5 @@ import '../integration.shard/test_data/hot_reload_test_common.dart';
|
||||
import '../src/common.dart';
|
||||
|
||||
void main() {
|
||||
testAll(
|
||||
chrome: true,
|
||||
additionalCommandArgs: <String>[
|
||||
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
|
||||
],
|
||||
);
|
||||
testAll(chrome: true, additionalCommandArgs: <String>['--web-experimental-hot-reload']);
|
||||
}
|
||||
|
||||
@@ -9,10 +9,5 @@ import '../integration.shard/test_data/hot_reload_with_asset_test_common.dart';
|
||||
import '../src/common.dart';
|
||||
|
||||
void main() {
|
||||
testAll(
|
||||
chrome: true,
|
||||
additionalCommandArgs: <String>[
|
||||
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
|
||||
],
|
||||
);
|
||||
testAll(chrome: true, additionalCommandArgs: <String>['--web-experimental-hot-reload']);
|
||||
}
|
||||
|
||||
@@ -9,10 +9,5 @@ import '../integration.shard/test_data/stateless_stateful_hot_reload_test_common
|
||||
import '../src/common.dart';
|
||||
|
||||
void main() {
|
||||
testAll(
|
||||
chrome: true,
|
||||
additionalCommandArgs: <String>[
|
||||
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
|
||||
],
|
||||
);
|
||||
testAll(chrome: true, additionalCommandArgs: <String>['--web-experimental-hot-reload']);
|
||||
}
|
||||
|
||||
@@ -73,9 +73,7 @@ Future<void> _testProject(
|
||||
late FlutterRunTestDriver flutter;
|
||||
|
||||
final List<String> additionalCommandArgs =
|
||||
useDDCLibraryBundleFormat
|
||||
? <String>['--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc']
|
||||
: <String>[];
|
||||
useDDCLibraryBundleFormat ? <String>['--web-experimental-hot-reload'] : <String>[];
|
||||
final String testName =
|
||||
'Hot restart (index.html: $name)'
|
||||
'${additionalCommandArgs.isEmpty ? '' : ' with args: $additionalCommandArgs'}';
|
||||
|
||||
Reference in New Issue
Block a user