diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index 1e0e6a3891..807f203394 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -329,6 +329,8 @@ class KernelCompiler { 'package:flutter/src/dart_plugin_registrant.dart', '-Dflutter.dart_plugin_registrant=${dartPluginRegistrant.uri}', ], + // See: https://github.com/flutter/flutter/issues/103994 + '--verbosity=error', ...?extraFrontEndOptions, mainUri, ]; @@ -795,6 +797,8 @@ class DefaultResidentCompiler implements ResidentCompiler { platformDill!, ], if (unsafePackageSerialization == true) '--unsafe-package-serialization', + // See: https://github.com/flutter/flutter/issues/103994 + '--verbosity=error', ...?extraFrontEndOptions, ]; _logger.printTrace(command.join(' ')); diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart index a4c34293b6..4bed2077fb 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/common_test.dart @@ -102,6 +102,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], exitCode: 1), ]); @@ -139,6 +140,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'), ]); @@ -177,6 +179,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'), ]); @@ -216,6 +219,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'foo', 'bar', 'file:///lib/main.dart', @@ -255,6 +259,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'), ]); @@ -292,6 +297,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'), ]); @@ -344,6 +350,7 @@ void main() { '$build/app.dill', '--depfile', '$build/kernel_snapshot.d', + '--verbosity=error', 'file:///lib/main.dart', ], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey /build/653e11a8e6908714056a57cd6b4f602a/app.dill 0\n'), ]); diff --git a/packages/flutter_tools/test/general.shard/compile_batch_test.dart b/packages/flutter_tools/test/general.shard/compile_batch_test.dart index 0156c49f79..9da1abd5f5 100644 --- a/packages/flutter_tools/test/general.shard/compile_batch_test.dart +++ b/packages/flutter_tools/test/general.shard/compile_batch_test.dart @@ -66,6 +66,7 @@ void main() { '--no-link-platform', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer), ]), @@ -111,6 +112,7 @@ void main() { '--no-link-platform', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer), ]), @@ -156,6 +158,7 @@ void main() { '--no-link-platform', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer, exitCode: 127), ]), @@ -203,6 +206,7 @@ void main() { '--tfa', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer), ]), @@ -251,6 +255,7 @@ void main() { '--tfa', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer), ]), @@ -299,6 +304,7 @@ void main() { '--no-link-platform', '--packages', '.packages', + '--verbosity=error', 'file:///path/to/main.dart', ], completer: completer), ]), @@ -348,6 +354,7 @@ void main() { '--no-link-platform', '--packages', '.packages', + '--verbosity=error', 'scheme:///main.dart', ], completer: completer), ]), @@ -402,6 +409,7 @@ void main() { '--source', 'package:flutter/src/dart_plugin_registrant.dart', '-Dflutter.dart_plugin_registrant=.dart_tools/flutter_build/dart_plugin_registrant.dart', + '--verbosity=error', 'scheme:///main.dart', ], completer: completer), ]), diff --git a/packages/flutter_tools/test/general.shard/compile_incremental_test.dart b/packages/flutter_tools/test/general.shard/compile_incremental_test.dart index 1a1c5eda43..955deb035b 100644 --- a/packages/flutter_tools/test/general.shard/compile_incremental_test.dart +++ b/packages/flutter_tools/test/general.shard/compile_incremental_test.dart @@ -80,7 +80,7 @@ void main() { testWithoutContext('incremental compile single dart compile', () async { fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdout: 'result abc\nline1\nline2\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, )); @@ -107,6 +107,7 @@ void main() { '/foo/bar/fizz', '--filesystem-scheme', 'scheme', + '--verbosity=error', ], stdout: 'result abc\nline1\nline2\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, @@ -128,7 +129,7 @@ void main() { testWithoutContext('incremental compile single dart compile abnormally terminates', () async { fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdin: frontendServerStdIn, )); @@ -144,7 +145,7 @@ void main() { testWithoutContext('incremental compile single dart compile abnormally terminates via exitCode', () async { fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdin: frontendServerStdIn, exitCode: 1, )); @@ -162,7 +163,7 @@ void main() { testWithoutContext('incremental compile and recompile', () async { final Completer completer = Completer(); fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, completer: completer, @@ -211,6 +212,7 @@ void main() { '/foo/bar/fizz', '--filesystem-scheme', 'scheme', + '--verbosity=error', ], stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, @@ -274,6 +276,7 @@ void main() { '/foo/bar/fizz', '--filesystem-scheme', 'scheme', + '--verbosity=error', ], stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, @@ -324,7 +327,7 @@ void main() { testWithoutContext('incremental compile can suppress errors', () async { final Completer completer = Completer(); fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, completer: completer, @@ -363,7 +366,7 @@ void main() { testWithoutContext('incremental compile and recompile twice', () async { final Completer completer = Completer(); fakeProcessManager.addCommand(FakeCommand( - command: frontendServerCommand, + command: const [...frontendServerCommand, '--verbosity=error'], stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0', stdin: frontendServerStdIn, completer: completer,