Skip to content

Commit 5bfeed2

Browse files
dcharkescommit-bot@chromium.org
authored andcommitted
[frontend_server] Don't print Severity.info messages
The info severity level has only been used in one instance before, and that could only occur in the compile command. https://dart-review.googlesource.com/c/sdk/+/180361 and https://dart-review.googlesource.com/c/sdk/+/180560 introduced the first uses of this severity level outside the compile command. This is the first time an `info` is emitted in the frontend_server. We don't want to emit `info`s for the server. This is a quick solution to fix that. The solution has been manually verified with a Flutter app run with a local engine build with this change patched in. Bug: flutter/flutter#75429 Keeping the diff as small as possible to ease cherry pick for release. The better solution is to make the frontend_server's verbosity level configurable. Bug: #44867 Change-Id: Ie40dbb27621053e90bc8943b8cb7c5ec4c9ed643 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183005 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent 302de78 commit 5bfeed2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/frontend_server/lib/frontend_server.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ class FrontendCompiler implements CompilerInterface {
353353
final List<String> errors = <String>[];
354354

355355
_onDiagnostic(DiagnosticMessage message) {
356+
// TODO(https://dartbug.com/44867): The frontend server should take a
357+
// verbosity argument and put that in CompilerOptions and use it here.
356358
bool printMessage;
357359
switch (message.severity) {
358360
case Severity.error:
@@ -361,9 +363,11 @@ class FrontendCompiler implements CompilerInterface {
361363
errors.addAll(message.plainTextFormatted);
362364
break;
363365
case Severity.warning:
364-
case Severity.info:
365366
printMessage = true;
366367
break;
368+
case Severity.info:
369+
printMessage = false;
370+
break;
367371
case Severity.context:
368372
case Severity.ignored:
369373
throw 'Unexpected severity: ${message.severity}';

0 commit comments

Comments
 (0)