[flutter_tools] prevent running analyze-size with split-debug-info (#66983)

Running a build command with split debug info and analyze size causes a crash in the snapshot analysis library. Disable the combination of these two flags.

Fixes #66962
This commit is contained in:
Jonah Williams
2020-09-30 11:15:49 -07:00
committed by GitHub
parent 9ca15d0118
commit fe22d196fc
2 changed files with 24 additions and 2 deletions

View File

@@ -81,4 +81,21 @@ void main() {
expect(result.exitCode, 1);
});
testWithoutContext('--analyze-size is not supported in combination with --split-debug-info', () async {
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await processManager.run(<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'apk',
'--analyze-size',
'--target-platform=android-arm64',
'--split-debug-info=infos'
], workingDirectory: fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'));
expect(result.stderr.toString(), contains('--analyze-size cannot be combined with --split-debug-info'));
expect(result.exitCode, 1);
});
}