-
Notifications
You must be signed in to change notification settings - Fork 811
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
Imports for custom/casttype are generated incorrectly under certain conditions #389
Comments
Very interesting. But customtype is meant for bytes fields. https://github.com/gogo/protobuf/blob/master/custom_types.md syntax = "proto3";
package moo;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "foo/bar/A.proto";
message C {
bytes f2 = 1 [(gogoproto.customtype) = "foo/bar.B"];
} |
But the very first example on that page seems to be not bytes? |
Good point. Hmmm. I will look at it later again, when I can give it more focus. |
Sorry I have not forgotten about you. |
Sorry again :( The reason I thought customtype needs to bytes is because this was always the case, until recently when the feature was extended to also allow messages. Really sorry about this delay. |
Thanks for reporting this. |
Really sorry for taking so long to fix this. |
Consider the following structure
foo/bar/A.proto
foo/bar/a.go
foo/moo/C.proto
Now the generated file (header) for C.proto:
As you can see "foo/bar" gets imported twice in this case, which causes a compilation error:
The text was updated successfully, but these errors were encountered: