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
support treating warnings as errors (-Werror) #3980
Comments
I'd happy to review if you could put together a PR. It would look like:
|
Add a --fatal_warnings flag that requests that protoc exit with a failing status code if any warnings are generated during compilation. Partially address protocolbuffers#3980.
Sorry, but why is this being closed? I’m still interested in this. The PR was similarly closed without comment. A bit of insight would be much appreciated! |
Sorry, I thought it has been solved by #4336 |
Looks like the PR (#4336) had an issue with one of the tests so was not approved. Then since it got no attention was closed out in a cleanup pass or something similar. I would rebase, double check the tests, and give it another try. Others, including me, are excited for this feature. |
It would be great to get this done! @benesch are you planning to resubmit your pull request? |
I'm afraid I'm busy with other stuff these days. You should feel free to take up the mantle, though! |
Add a --fatal_warnings flag that requests that protoc exit with a failing status code if any warnings are generated during compilation. Partially address protocolbuffers#3980.
Challenge accepted, Admiral! 😎 #8131 |
Add a --fatal_warnings flag that requests that protoc exit with a failing status code if any warnings are generated during compilation. Partially address protocolbuffers#3980.
Add a --fatal_warnings flag that requests that protoc exit with a failing status code if any warnings are generated during compilation. Partially address protocolbuffers#3980.
Add a --fatal_warnings flag that requests that protoc exit with a failing status code if any warnings are generated during compilation. Partially address #3980.
Should this issue be closed now? #8131 seems to have been merged in. |
Compiler warnings from
protoc
can get lost, especially when part of a large build system, and there's no flag—at least, not one that I can find—to upgrade those warnings into fatal errors, like the-Werror
flag does for GCC.It would also be nice to provide plugins with an interface for indicating when a warning has been produced, so that
protoc
can exit with a failing exit status if-Werror
has been passed. Our Go protobuf generator produces some warnings that we'd like to treat as errors, for example: gogo/protobuf/issues/356The text was updated successfully, but these errors were encountered: