-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
Description
Problem Statement
In our project, we prefer to enable strict protobuf validations, with --fatal_warnings
on for our targets.
Currently, we're not able to do so if any of the third-party libraries have protobuf files with warnings. So we're looking for some logic that would allow us to:
- Specify
--fatal_warnings
for our targets - Leave it disabled for third-parties
Proposed Solution
If we take a look into how CC rules are implemented, there are 2 ways to supply CC options:
--copt
global flag that sets an option for everybodycopts
attribute ofcc_library
andcc_binary
rules
For protoc, there is --protocopt
which is sort of similar to --copt
, but there is no way to specify options on a per-target basis. It would be great to see protocopts
for the proto_library
rule.
Something like:
proto_library(
name = "sample_proto",
srcs = ["sample.proto"],
protocopts = ["--fatal_warnings"], # Here is the added part
visibility = ["//visibility:public"],
)
PruthvirajHawale, vivekmathur4u, amit-mahendrakar, g4ur4v, pragati472 and 2 more
Metadata
Metadata
Assignees
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)