Pass --verbosity=error to the Dart front-end (#104020)
This commit is contained in:
@@ -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(' '));
|
||||
|
||||
@@ -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'),
|
||||
]);
|
||||
|
||||
@@ -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),
|
||||
]),
|
||||
|
||||
@@ -80,7 +80,7 @@ void main() {
|
||||
|
||||
testWithoutContext('incremental compile single dart compile', () async {
|
||||
fakeProcessManager.addCommand(FakeCommand(
|
||||
command: frontendServerCommand,
|
||||
command: const <String>[...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 <String>[...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 <String>[...frontendServerCommand, '--verbosity=error'],
|
||||
stdin: frontendServerStdIn,
|
||||
exitCode: 1,
|
||||
));
|
||||
@@ -162,7 +163,7 @@ void main() {
|
||||
testWithoutContext('incremental compile and recompile', () async {
|
||||
final Completer<void> completer = Completer<void>();
|
||||
fakeProcessManager.addCommand(FakeCommand(
|
||||
command: frontendServerCommand,
|
||||
command: const <String>[...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<void> completer = Completer<void>();
|
||||
fakeProcessManager.addCommand(FakeCommand(
|
||||
command: frontendServerCommand,
|
||||
command: const <String>[...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<void> completer = Completer<void>();
|
||||
fakeProcessManager.addCommand(FakeCommand(
|
||||
command: frontendServerCommand,
|
||||
command: const <String>[...frontendServerCommand, '--verbosity=error'],
|
||||
stdout: 'result abc\nline0\nline1\nabc\nabc /path/to/main.dart.dill 0',
|
||||
stdin: frontendServerStdIn,
|
||||
completer: completer,
|
||||
|
||||
Reference in New Issue
Block a user