Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend_server verbosity level for printing #44867

Closed
dcharkes opened this issue Feb 5, 2021 · 0 comments
Closed

frontend_server verbosity level for printing #44867

dcharkes opened this issue Feb 5, 2021 · 0 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues.

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Feb 5, 2021

_onDiagnostic(DiagnosticMessage message) {
bool printMessage;
switch (message.severity) {
case Severity.error:
case Severity.internalProblem:
printMessage = true;
errors.addAll(message.plainTextFormatted);
break;
case Severity.warning:
case Severity.info:
printMessage = true;
break;
case Severity.context:
case Severity.ignored:
throw 'Unexpected severity: ${message.severity}';
}
if (printMessage) {
printDiagnosticMessage(message, _outputStream.writeln);
}
}

The frontend_server should have a verbosity level setting and use that while deciding to print things to the configured output stream.

Currently it also prints Severity.info, leading to flutter/flutter#75429.

I'll make a CL to exclude info from prints, but the cleaner solution would be to support a verbosity level in the frontend_server.

As discussed with @johnniwinther.

dart-bot pushed a commit that referenced this issue Feb 5, 2021
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 <johnniwinther@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
dart-bot pushed a commit that referenced this issue Feb 8, 2021
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 <johnniwinther@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
@mit-mit mit-mit added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Feb 24, 2021
@johnniwinther johnniwinther self-assigned this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues.
Projects
None yet
Development

No branches or pull requests

3 participants