goprotoc
goprotoc copied to clipboard
Recommendation: add disclaimer regarding using this to implement protoc plugins
Howdy, what's the status of this project?
I ask as, in the process of attempting to implement a protoc plugin (a while ago - I've kinda forgotten the details), I ran into significant issues with the name (and maybe type, I don't remember unfortunately) resolution, provided by this module.
I believe that the core problem was in the general vicinity of https://github.com/jhump/goprotoc/blob/70c8197ef4ea66d11022326b63050f6fa10f6b29/plugins/names.go#L20 , and related to the generated field name resolution not being 1-1 with the protoc-gen-go
implementation. I'd imagine it'd be possible to trigger at least similar issues if there are fields which collide with generated getters.
Anyway, you're probably aware that google.golang.org/protobuf/compiler/protogen is a thing, nowadays. IMO it would be best to advertise the official protogen package in the readme of this package, particularly due to #37 .
This project seems kinda like a connector for https://github.com/jhump/gopoet , which I did end up using, and quite liked. It did what I needed and was easy to understand and use. It's just something I slapped together, but I've implemented a vaguely similar type cache myself, connecting gopoet and the official protogen packages (I don't mean that as a self plug, just a FYI).
mentioned above: https://github.com/joeycumines/gopoet-protogen example usage of the above module: https://github.com/joeycumines/protoc-gen-go-copy