mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
remove the --use-cfe flag from flutter analyze (#21463)
This commit is contained in:
parent
7e3ebfc7e0
commit
e55b0f5244
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue