You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be nice to allow users to provide custom arguments to protoc. Currently, there doesn't seem to be a way to do it.
My current use case, I'm trying to generate only a proto descriptor set using the following:
proto_compile(
name = "person_proto",
protos = ["person.proto"],
langs = [],
args = [
"--include_imports",
"--include_source_info",
],
)
With the hope that this would result in the following command: protoc --include_imports --include_source_info person.proto --descriptor_set_out person.descriptor_set
However, I can't figure out a way to make the args attr available to protoc. What do you think about this idea?
The text was updated successfully, but these errors were encountered:
It is possible to add arbitrary arguments to a proto_language via the pb_options attribute, but you are explicitly not using langs. I didn't anticipate that use case, but I agree it should be possible. I'll put together a PR for this.
Not sure this is the right place to do this, but I have a similar-ish request, but more tuned to the individual plugins. For example, if I wanted to take advantage of the flag this grpc-gateway PR adds, I'd have no idea where I'd even start that process.
I think it would be nice to allow users to provide custom arguments to protoc. Currently, there doesn't seem to be a way to do it.
My current use case, I'm trying to generate only a proto descriptor set using the following:
With the hope that this would result in the following command:
protoc --include_imports --include_source_info person.proto --descriptor_set_out person.descriptor_set
However, I can't figure out a way to make the
args
attr available to protoc. What do you think about this idea?The text was updated successfully, but these errors were encountered: