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 signals libprotobuf warnings as errors #27502

Closed
codami opened this issue Sep 28, 2021 · 1 comment
Closed

Grpc.Tools signals libprotobuf warnings as errors #27502

codami opened this issue Sep 28, 2021 · 1 comment

Comments

@codami
Copy link

codami commented Sep 28, 2021

What version of gRPC and what language are you using?

C#
Google.Protobuf: 3.18.0
Grpc.AspNetCore: 2.39.0
Grpc.Tools: 2.40.0

What operating system (Linux, Windows,...) and version?

Linux & Windows

What did you do?

I was building a .NET Class Library (gRPC Server side code) out of a proto file, using "dotnet build" and the _Protobuf_CoreCompile task failed after a couple of errors like this one:
[libprotobuf WARNING T : error : \src\github\grpc\workspace_protoc_windows_x64\third_party\protobuf\src\google\protobuf\compiler\csharp\csharp_enum.cc:74] Duplicate enum value Short (originally MY_VIEW_SHORT) in MyView; adding underscore to distinguish

What did you expect to see?

I would expect to see warnings at most, since the libprotobuf output was just a warning.

What did you see instead?

The build failed because of errors.

After starting the command manually I have noticed that the original output from the libprotobuf is this one:
[libprotobuf WARNING T:\src\github\grpc\workspace_protoc_windows_x64\third_party\protobuf\src\google\protobuf\compiler\csharp\csharp_enum.cc:74] Duplicate enum value Short (originally MY_VIEW_SHORT) in MyView; adding underscore to distinguish

A closer look at the Grpc.Tools implementation shows that the warning above is converted into error by this matching regex:

pattern: "^(?'FILENAME'.+?): ?(?'TEXT'.*)",

@tonydnewell
Copy link
Contributor

I've created a PR to fix this

kerrickstaley added a commit to kerrickstaley/path-data that referenced this issue Nov 19, 2022
The issue [1] that was keeping us on an old Grpc-Tools version has been
fixed. Bump to the latest versions of Grpc and Grpc-Tools. One notable
upgrade this gets us is Apple Silicon support.

[1] grpc/grpc#27502
kerrickstaley added a commit to kerrickstaley/path-data that referenced this issue Nov 19, 2022
The issue [1] that was keeping us on an old Grpc-Tools version has been
fixed. Bump to the latest versions of Grpc and Grpc-Tools. One notable
upgrade this gets us is Apple Silicon support.

[1] grpc/grpc#27502
mrazza pushed a commit to mrazza/path-data that referenced this issue Dec 6, 2022
The issue [1] that was keeping us on an old Grpc-Tools version has been
fixed. Bump to the latest versions of Grpc and Grpc-Tools. One notable
upgrade this gets us is Apple Silicon support.

[1] grpc/grpc#27502

Co-authored-by: Kerrick Staley <k@kerrickstaley.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants