protobuild icon indicating copy to clipboard operation
protobuild copied to clipboard

add option parameter for the generator

Open Tommy-42 opened this issue 6 years ago • 1 comments

We cannot add option to the choosen generator.

For example with protoc-gen-gotemplate

you can add debug or template_dir option to the generator like : --gotemplate_out=template_dir=.,debug=true:.

It could be cool to have an option in the Protobuild.toml to be able to add them something like :

[[generator]]
  name = "gotemplate"

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

What do you think ?

Tommy-42 avatar Apr 05 '18 09:04 Tommy-42

Protobuild currently calculates the options to be passed into the generator. You'd have to come up with a way to specify extra options for each instantiation of the generator. Right now, generator is just a string field.

How would this interact with what is already present?

stevvooe avatar Sep 24 '18 17:09 stevvooe