bufbuild / rules_buf

Bazel rules for Buf.
Apache License 2.0
47 stars 17 forks source link

Use gazelle to auto generate more rule language rules for protos #82

Open DolceTriade opened 3 months ago

DolceTriade commented 3 months ago

Currently, rules_buf only uses gazelle via the @go_repository_tools repo to generate the proto_library rules. It would be nice if we could also use the repository gazelle to also generate all the language rules too.

I'm not sure the best way to accomplish this, but it would be fine it was a post-step after running update-repos, as long as it was automatic...

srikrsna-buf commented 3 months ago

Do you mean in the repo rule? Or the gazelle build run that you run?

DolceTriade commented 3 months ago

I don't really have an opinion on where this happens. I'd just like the protos imported via buf to have language specific rules automatically instead me having to manually define them.

Apparently, this is possible using stackb_rules_proto. I think if we substitute the gazelle used there with the one in the stackb repo, we could generate all the language specific rules that it supports.

https://github.com/stackb/rules_proto?tab=readme-ov-file#proto_repository