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

Grpc.Tools: Parse warnings from libprotobuf (fix #27502) #30371

Merged
merged 2 commits into from Sep 5, 2022

Conversation

tonydnewell
Copy link
Contributor

Fix for #27502

The warnings and errors logged by some of the plugins such as the csharp plugin are in a different format from other warnings etc logged by the protobuf compiler (the plugins use GOOGLE_LOG to log message).

The parsing code in Grpc.Tools has been modified to correctly parse these so that warnings are no longer handled as errors.

The unit tests have been extended and fixed (they did not notice if a test case did not match the expected log level).

The warnings and errors logged by some of the pluggins such as the csharp
plugin are in a different format from other warnings etc logged by the
protobuf compiler (the plugins use GOOGLE_LOG to log message).
The parsing code in Grpc.Tools has been modified to correctly parse these
so that warnings are no longer handled as errors.
Copy link
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not massively familiar with this code, but assuming the new tests failed before and pass now, this LGTM.

// The filename and line logged by the plugins may not be useful to the
// end user as they are not the location in the proto file but rather
// in the source code for the plugin. Log them anyway as they may help in
// diagnositics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: diagnositics => diagnostics, here and below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed typos

@jtattermusch jtattermusch self-requested a review August 16, 2022 12:32
@jtattermusch jtattermusch self-assigned this Aug 16, 2022
@jtattermusch jtattermusch added the release notes: yes Indicates if PR needs to be in release notes label Aug 16, 2022
@jtattermusch jtattermusch changed the title issue 27502 - parse warning from libprotobuf Grpc.Tools: Parse warning from libprotobuf (fix #27502) Aug 16, 2022
@jtattermusch jtattermusch changed the title Grpc.Tools: Parse warning from libprotobuf (fix #27502) Grpc.Tools: Parse warnings from libprotobuf (fix #27502) Aug 16, 2022
Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jtattermusch jtattermusch merged commit e313ac8 into grpc:master Sep 5, 2022
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported Specifies if the PR has been imported to the internal repository lang/C# release notes: yes Indicates if PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants