Skip to content

Imports of google/protobuf/*.proto should point to types packages in generated code #129

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

Closed
aaronbee opened this issue Feb 12, 2016 · 3 comments

Comments

@aaronbee
Copy link

Now that #50 has been implemented (thanks!), it would be nice if the code generated by protoc-gen-go pointed to the included compiled files.

For example, if a .proto files imports google/protobuf/any.proto, I need to pass
Mgoogle/protobuf/any.proto=github.com/golang/protobuf/types/any
to the protoc-gen-go plugin.

Is the plan to update protoc-gen-go to automatically handle these imports?

@dsymonds
Copy link
Contributor

It's a good idea. There's another issue open for figuring out how to improve the M mapping in general, but perhaps these special types deserve special treatment.

@dsymonds
Copy link
Contributor

dsymonds commented Mar 3, 2016

I think the better plan is in #139, namely letting the .proto file declare its import path. Then we don't need to bake it in to protoc-gen-go.

@dsymonds dsymonds closed this as completed Mar 3, 2016
@bufdev
Copy link

bufdev commented Mar 8, 2016

The problem here is that the well-known type files in google/protobuf do not have this - I would think it should either be added to google/protobuf, or we should not assume this in golang/protobuf

@golang golang locked and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants