Unverified Commit e55b0f52 authored by Devon Carew's avatar Devon Carew Committed by GitHub

remove the --use-cfe flag from flutter analyze (#21463)

parent 7e3ebfc7
...@@ -34,10 +34,6 @@ class AnalyzeCommand extends FlutterCommand { ...@@ -34,10 +34,6 @@ class AnalyzeCommand extends FlutterCommand {
valueHelp: 'path-to-sdk', valueHelp: 'path-to-sdk',
help: 'The path to the Dart SDK.', help: 'The path to the Dart SDK.',
hide: !verboseHelp); hide: !verboseHelp);
argParser.addFlag('use-cfe',
help: 'Run the analysis server with the --use-cfe option. This is a '
'temporary flag for use while the analyzer migrates to the CFE.',
hide: !verboseHelp);
// Hidden option to enable a benchmarking mode. // Hidden option to enable a benchmarking mode.
argParser.addFlag('benchmark', argParser.addFlag('benchmark',
......
...@@ -76,7 +76,6 @@ class AnalyzeOnce extends AnalyzeBase { ...@@ -76,7 +76,6 @@ class AnalyzeOnce extends AnalyzeBase {
final AnalysisServer server = new AnalysisServer( final AnalysisServer server = new AnalysisServer(
sdkPath, sdkPath,
directories.toList(), directories.toList(),
useCfe: argResults.wasParsed('use-cfe') ? argResults['use-cfe'] : null,
); );
StreamSubscription<bool> subscription; StreamSubscription<bool> subscription;
......
...@@ -14,11 +14,10 @@ import '../base/utils.dart'; ...@@ -14,11 +14,10 @@ import '../base/utils.dart';
import '../globals.dart'; import '../globals.dart';
class AnalysisServer { class AnalysisServer {
AnalysisServer(this.sdkPath, this.directories, { this.useCfe }); AnalysisServer(this.sdkPath, this.directories);
final String sdkPath; final String sdkPath;
final List<String> directories; final List<String> directories;
final bool useCfe;
Process _process; Process _process;
final StreamController<bool> _analyzingController = final StreamController<bool> _analyzingController =
...@@ -38,10 +37,6 @@ class AnalysisServer { ...@@ -38,10 +37,6 @@ class AnalysisServer {
sdkPath, sdkPath,
]; ];
if (useCfe != null) {
command.add(useCfe ? '--use-cfe' : '--no-use-cfe');
}
printTrace('dart ${command.skip(1).join(' ')}'); printTrace('dart ${command.skip(1).join(' ')}');
_process = await processManager.start(command); _process = await processManager.start(command);
// This callback hookup can't throw. // This callback hookup can't throw.
......
...@@ -178,23 +178,6 @@ StringBuffer bar = StringBuffer('baz'); ...@@ -178,23 +178,6 @@ StringBuffer bar = StringBuffer('baz');
tryToDelete(tempDir); tryToDelete(tempDir);
} }
}); });
testUsingContext('use-cfe flag is recognized', () async {
const String contents = '''
StringBuffer bar = StringBuffer('baz');
''';
final Directory tempDir = fs.systemTempDirectory.createTempSync();
tempDir.childFile('main.dart').writeAsStringSync(contents);
try {
await runCommand(
command: new AnalyzeCommand(workingDirectory: fs.directory(tempDir)),
arguments: <String>['analyze', '--no-use-cfe'],
statusTextContains: <String>['No issues found!'],
);
} finally {
tempDir.deleteSync(recursive: true);
}
});
}); });
} }
......
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