Revert "It's time to #deleteDart1 (#18293)" (#18313)

Several benchmarks started failing during kernel compile:
1. Timeouts:
   * commands_test
   * hot_mode_dev_cycle__benchmark
   * run_machine_concurrent_hot_reload
   * service_extensions_test

2. Kernel compiler crash:
   * hot_mode_dev_cycle_linux__benchmark
   * routing_test

3. Unexpected termination:
   * hot_mode_dev_cycle_win__benchmark

This reverts commit ed63e7082a.
This commit is contained in:
Chris Bracken
2018-06-08 12:43:11 -07:00
committed by GitHub
parent ed63e7082a
commit 9495df4bc3
45 changed files with 873 additions and 220 deletions

View File

@@ -13,10 +13,11 @@ import '../base/process_manager.dart';
import '../globals.dart';
class AnalysisServer {
AnalysisServer(this.sdkPath, this.directories);
AnalysisServer(this.sdkPath, this.directories, {this.previewDart2 = false});
final String sdkPath;
final List<String> directories;
final bool previewDart2;
Process _process;
final StreamController<bool> _analyzingController =
@@ -34,9 +35,14 @@ class AnalysisServer {
snapshot,
'--sdk',
sdkPath,
'--preview-dart-2',
];
if (previewDart2) {
command.add('--preview-dart-2');
} else {
command.add('--no-preview-dart-2');
}
printTrace('dart ${command.skip(1).join(' ')}');
_process = await processManager.start(command);
// This callback hookup can't throw.