rules_proto
rules_proto copied to clipboard
fix: allow generated files to be in a subfolder
The logic for taking the basename assumes that outputs are in the same folder with the package.
This fix allows a protoc invocation like
proto_compile(
name = "view_display_proto_compile",
output_mappings = ["payload/view_display_pb2.py=internal/payload/view_display_pb2.py"],
outputs = ["payload/view_display_pb2.py"],
plugins = ["@build_stack_rules_proto//plugin/builtin:python"],
proto = "view_display_proto",
)
Note: I only tested this with manually generated rules, I imagine changes to the gazelle plugin would also be needed.
Thanks @alexeagle I'll take a look at this. Outputs in subfolders would indeed be a new usage.
ping! :)
Sadly this is quite old. Will close due to age, but we can pick this up again if still needed.