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

change to SupportPackageIsVersion3 for gRPC #185

Closed
gyuho opened this issue Jun 15, 2016 · 10 comments
Closed

change to SupportPackageIsVersion3 for gRPC #185

gyuho opened this issue Jun 15, 2016 · 10 comments

Comments

@gyuho
Copy link

gyuho commented Jun 15, 2016

Could we change https://github.com/gogo/protobuf/blob/master/plugin/grpc/grpc.go#L51 to version 3?

Now it's SupportPackageIsVersion3 in gRPC.

Related:

Please feel free to close this if I am asking the wrong question.

Thanks!

@dongsupark
Copy link

+1.
I just stumbled across this issue, while building torus, which depends on etcd, which depends again on grpc. As a workaround, I had to manually revert grpc/grpc-go@e78224b to get the build working.

@ax-nathan
Copy link

+1

@beejeebus
Copy link

i created #187 to fix this issue.

@awalterschulze
Copy link
Member

Sorry for the delay
You are talking about merging this commit
golang/protobuf@0c1f6d6
which requires this commit
golang/protobuf@545732f

@awalterschulze
Copy link
Member

The file index concept in golang/protobuf to avoid variable name conflicts is fundamentally flawed. gogoprotobuf rather uses the filename as a suffix to its generated variables to avoid many more conflicts.

For example:

Running these two in the same folder

protoc --gogo_out=. a.proto
protoc --gogo_out=. b.proto

will produce two variables with the same index value (0) and thus same name in the same package which will result in a go compiler error.

So whether to merge this is an interesting question.

Clearly they incremented the version number because they added a populated field which changes the API semantics. So this needs to be taken seriously.

@awalterschulze
Copy link
Member

@tamird can you remember where we or someone logged this issue? I want to link it again.

@awalterschulze
Copy link
Member

Ok so it just links to the generated fileDescriptor. This should be easy to merge.

@awalterschulze
Copy link
Member

Done 55bbb6b

@awalterschulze
Copy link
Member

awalterschulze commented Jun 17, 2016

@tamird please ignore my question.

@gyuho
Copy link
Author

gyuho commented Jun 17, 2016

Thanks a lot!

dongsupark pushed a commit to dongsupark/torus that referenced this issue Jun 19, 2016
To fix build error with gRPC, having SupportPackageIsVersion3 instead of 2,
regenerate protobuf.

See also gogo/protobuf#185.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants