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

using protobuild with multiple generator #15

Closed
Tommy-42 opened this issue Mar 14, 2018 · 8 comments
Closed

using protobuild with multiple generator #15

Tommy-42 opened this issue Mar 14, 2018 · 8 comments
Assignees

Comments

@Tommy-42
Copy link

Hello,

I was wondering if protobuild could actually be able to be used with more than 1 generator ?

I can't use both go_out and grpc-gateway_out that I normaly use with protoc command line.
I have to do 2 .toml right ?

I can't find anything on this topic.

Should it be supported ?
Is it on a TODO ?

Best regards,
Thanks for the awesome job tho !

@Tommy-42
Copy link
Author

Tommy-42 commented Apr 5, 2018

I have think about it.

Could we think about something like this :

[[generator]]
  name = "gotemplate"

  [generator.options]
    debug = true
    template_dir = "."

[[generator]]
  name = "gogo"

  [generator.options]
    debug = true

  [generator.plugins]
    ["grpc", "blabla"]

@Tommy-42
Copy link
Author

Tommy-42 commented Apr 6, 2018

Hey @stevvooe

I have forked an done something that might interest you, could you have a look and tell me if it can work for you ? ( that should resolve #15 and #17 )

What I need to change, etc before pushing a PR ?

https://github.com/Tommy-42/protobuild

Thanks

@stevvooe
Copy link
Member

stevvooe commented Apr 9, 2018

Can you do this with overrides?

@stevvooe
Copy link
Member

stevvooe commented Apr 9, 2018

Is your proposal backwards compatible?

@alshabib
Copy link

It cannot be done with overrides because in some (or most) cases you want to apply two or more generators to the same proto files.

@Tommy-42 suggestion looks god provided it is backwards compatible.

The workaround I am using for now in two config files and running protobuild twice using the -f option.

@stevvooe
Copy link
Member

@Tommy-42 I guess send a pull request. Make sure there are examples of how the output gets generated, along with intermediary commands.

@kzys
Copy link
Member

kzys commented Sep 27, 2021

This could be addressed for supporting Google's latest Go code generator. It doesn't support gRPC plugin anymore.

@kzys kzys self-assigned this Sep 27, 2021
@kzys
Copy link
Member

kzys commented Feb 18, 2022

It should be possible now, like

generators = ["go", "go-grpc"]
.

@kzys kzys closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants