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

This commit is contained in:
Devon Carew 2018-09-06 07:18:59 -07:00 committed by GitHub
parent 7e3ebfc7e0
commit e55b0f5244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 28 deletions

View file

@ -34,10 +34,6 @@ class AnalyzeCommand extends FlutterCommand {
valueHelp: 'path-to-sdk',
help: 'The path to the Dart SDK.',
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.
argParser.addFlag('benchmark',

View file

@ -76,7 +76,6 @@ class AnalyzeOnce extends AnalyzeBase {
final AnalysisServer server = new AnalysisServer(
sdkPath,
directories.toList(),
useCfe: argResults.wasParsed('use-cfe') ? argResults['use-cfe'] : null,
);
StreamSubscription<bool> subscription;

View file

@ -14,11 +14,10 @@ import '../base/utils.dart';
import '../globals.dart';
class AnalysisServer {
AnalysisServer(this.sdkPath, this.directories, { this.useCfe });
AnalysisServer(this.sdkPath, this.directories);
final String sdkPath;
final List<String> directories;
final bool useCfe;
Process _process;
final StreamController<bool> _analyzingController =
@ -38,10 +37,6 @@ class AnalysisServer {
sdkPath,
];
if (useCfe != null) {
command.add(useCfe ? '--use-cfe' : '--no-use-cfe');
}
printTrace('dart ${command.skip(1).join(' ')}');
_process = await processManager.start(command);
// This callback hookup can't throw.

View file

@ -178,23 +178,6 @@ StringBuffer bar = StringBuffer('baz');
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);
}
});
});
}