[flutter_tools] Allow the tool to suppress compilation errors. (#58539)

Suppress compilation errors on startup so they are not duplicated from the native build step.
This commit is contained in:
Jonah Williams
2020-06-03 12:00:03 -07:00
committed by GitHub
parent 216e15990d
commit e216eec7b4
12 changed files with 167 additions and 68 deletions

View File

@@ -638,7 +638,11 @@ class MockResidentCompiler extends BasicMock implements ResidentCompiler {
}
@override
Future<CompilerOutput> recompile(Uri mainPath, List<Uri> invalidatedFiles, { String outputPath, PackageConfig packageConfig }) async {
Future<CompilerOutput> recompile(Uri mainPath, List<Uri> invalidatedFiles, {
String outputPath,
PackageConfig packageConfig,
bool suppressErrors = false,
}) async {
globals.fs.file(outputPath).createSync(recursive: true);
globals.fs.file(outputPath).writeAsStringSync('compiled_kernel_output');
return CompilerOutput(outputPath, 0, <Uri>[]);