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

protoc-gen-yarpc-go does not support implement full paths in go_package #1547

Closed
robbertvanginkel opened this issue Aug 15, 2018 · 3 comments

Comments

@robbertvanginkel
Copy link
Contributor

protoc-gen-go supports having import paths in the go_package, which influences what directory the generated code is outputted to. See golang/protobuf#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.

@bufdev
Copy link
Contributor

bufdev commented Aug 15, 2018

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.

@akshayjshah
Copy link
Contributor

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.

@bufdev
Copy link
Contributor

bufdev commented Aug 16, 2018

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

@biosvs biosvs closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants