rules_proto_grpc icon indicating copy to clipboard operation
rules_proto_grpc copied to clipboard

Inconsistency between warning messages

Open amit-traiana opened this issue 5 years ago • 0 comments

Our CI job is getting polluted by a lot of "Warnings" like:

service/service.proto: warning: Import scalapb/scalapb.proto but not used.
service/service_.proto: warning: Import google/api/annotations.proto but not used.

Here's how the BUILD file looks like:

# Proto
proto_library(
    name = "service_proto",
    srcs = ["service.proto"],
    deps = [
        "@com_google_api//google/api:annotations_proto",
        "@scalapb_proto//scalapb:scalapb_proto",
    ],
)

# Java
java_proto_compile(
    name = "service_java_proto",
    deps = [":service_proto"],
)

In reality, both are being used by the Protobuf file. If I run the proto_library target alone, I won't get any warnings (unless there's an actually an import I don't use). But java_proto_compile will output a warning about any external dependency.

amit-traiana avatar Jun 11 '20 08:06 amit-traiana