yarpc-go
yarpc-go copied to clipboard
protoc-gen-yarpc-go does not support implement full paths in go_package
protoc-gen-go supports having import paths in the go_package, which influences what directory the generated code is outputted to. See https://github.com/golang/protobuf/issues/139 for more details.
The protoc-gen-yarpc-go plugin currently does not support this, which results in having generated code that should be in the same package/path end up in different paths when calling the protoc with the same command but a different plugin. This can be worked around by not using the same output path, but we should probably implement the proposal to have the plugin behave similarly to the default go plugin.
I would not support this personally - I outlawed this in Prototool for a reason, basically long-form go_package values really mess with generated code and enforce the creation of sub-directories you may not want. If anything, I would error in yarpc-go if there is a long-form go_package value.
Unfortunately, we don't author all the Proto files that we need to generate YARPC code for. This came up when trying to generate YARPC code for gRPC's health check service.
You can modify go packages using gogoreplace in gogo/protobuf or just sed, a lot of projects do this including etcd. Long-form packages will cause a lot of issues down the road if you support them at the company