Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make proto_compile accept additional args? #57

Closed
perezd opened this issue Jan 21, 2017 · 2 comments
Closed

make proto_compile accept additional args? #57

perezd opened this issue Jan 21, 2017 · 2 comments

Comments

@perezd
Copy link
Contributor

perezd commented Jan 21, 2017

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?

@pcj
Copy link
Contributor

pcj commented Jan 21, 2017

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.

pcj added a commit that referenced this issue Jan 21, 2017
* Also makes the `langs` attribute non-mandatory.

Closes #57
@AmandaCameron
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants