rules-proto-grpc / rules_proto_grpc

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
https://rules-proto-grpc.com
Apache License 2.0
249 stars 156 forks source link

Honor prefix_path when output_mode is NO_PREFIX_FLAT #310

Closed linzhp closed 4 weeks ago

linzhp commented 7 months ago

Currently prefix_path is honored when output mode is PREFIXED or NO_PREFIX, but not honored when it's NO_PREFIX_FLAT. This is inconsistent. This PR fixed that.

Furthermore, this PR is one way of fixing #309, because people will be able to set something below to get rid of the "k8s.io" path generated by grpc:

python_grpc_library(
    name = "py_lib",
    protos = [":proto_lib"],
    output_mode = "NO_PREFIX_FLAT",
    prefix_path = "k8s/io/apimachinary",
    python_version = "PY3",
)
linzhp commented 7 months ago

@aaliddell is the CI broken?