rules_proto icon indicating copy to clipboard operation
rules_proto copied to clipboard

How to set `--fatal_warnings`?

Open Kernald opened this issue 4 years ago • 3 comments
trafficstars

Is there a way to enforce that every proto_library target are compiled with --fatal_warnings?

For reference, this flag was added here, and causes the compilation to fail if a warning is raised, like -Werror with GCC.

Kernald avatar Aug 24 '21 04:08 Kernald

Try using --protocopt=--fatal_warning.

comius avatar Feb 08 '22 07:02 comius

--protocopt=--fatal_warnings indeed seems to work. I'm happy to either close this or leave it open to have a way to set this directly in the toolchain configuration in Bazel - not sure what's the most common way to do this kind of things.

Kernald avatar Feb 08 '22 21:02 Kernald

We should have a way to specify protoc-opts in the (not-yet-existing) proto_toolchain in addition to the command-line.

Yannic avatar Feb 08 '22 21:02 Yannic