-
Notifications
You must be signed in to change notification settings - Fork 447
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
update protobuf and grpc versions #123
Conversation
This would be nice to have. Any way we can get this merged upstream? |
Can you explain what you mean by support protobuf v3? This has always used v3. |
Protobuf has some internal versioning to check compatibility between the library and generated code. Currently, upstream protobuf at version 3[1], but not the version we depend on in I'm not too familiar with go mod to understand how declared dependency versions impact users of library though. I'd would have guessed that we should declared the least version we can depend on, and downstream applications can choose a specify a higher minor version and go mod can handle it well. Is that not the case? [1] https://github.com/golang/protobuf/blob/v1.3.2/proto/lib.go#L944-L946 |
I've continued this over at #128 . There's nothing specific to protobuf3 support (since it's already there), only latest versions bump. |
I think you're misunderstanding the ProtoPackageIsVersionWhatever. That has nothing to do with protov2 vs proto3, it has to do with the internal version of the package's internal API. What is the actual problem being solved here? I'm not against bumping deps, but what is the specific issue you're running into? |
Hi all, it took me sometimes to recall what issues i've ran into. Basically if i compile my proto file using later version of proto gen for golang, the generated code has this line: const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package However, in protobuf 1.2.0 which comes with Please checkout my simple project: https://github.com/trung/go-plugin-with-channels. If you remove the explicit protobuf and grpc dependencies in
Also it would be good to use I'll promise to write better PR description next time :) Thanks for creating a great library. |
Generally speaking I'm for keeping deps up to date. However there is a danger here: Because of go modules minimum versioning algorithm, an update here will mean that all downstream users of this package will be forced to use the updated version. I worry that this will fix your problem but cause others elsewhere. I'm not sure though. |
I personally don't mind adding protobuf and grpc with later versions to overwrite the transitive 1.2.0 in protobuf 1.3.0 release note and grpc 1.18.0 release note don't seem highlight anything about break changes so I assume it's backward compatible with 1.2.0. Having said that, the call is yours. I respect your final decision on this. |
I'm at HC but don't really work with this lib much. @jbardin given the conversation above, what do you think? Other software also using protobuf and grpc may well already be using newer versions from other deps, so I think it's probably fine. Worse comes to worse people could fork off and use a fork with lower deps? |
I can't think of any major issues, and as mentioned earlier, Terraform and Vault both already pull in 1.3.x. This should probably be bumped to 1.3.2 if were going to update it. It might be a good idea to tag a release on each side here, just to make it easier for others to reference, maybe 1.0.2 and 1.2.0? |
I think just 1.0.2 and 1.0.3. There's nothing backwards incompatible in the lib, it's just updated deps. |
I'm going to just chime in that this is probably safe to do, I just tested some of our projects with a replace directive and updating proto lib and it was fine. I think if we bring it in with #135 and maybe some other PRs here (I'm doing a sweep and will bring up more for review) then we can mark the 1.1.0. |
Talked to @jbardin and others at HEX. I updated to latest (1.3.4) and |
To support protobuf v3:
There are some auto cleanup by
go mod
as the result.I'm using
go 1.11.12