-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use a published version of the rust-proto branch #31
base: master
Are you sure you want to change the base?
Conversation
This uses the same code as before, but uses it via crates.io, rather than Git. Signed-off-by: Nick Cameron <nrc@ncameron.org>
@@ -16,8 +16,8 @@ prost-codec = ["syn", "quote", "prost-build"] | |||
grpcio-prost-codec = ["grpcio-compiler/prost-codec", "prost-codec"] | |||
|
|||
[dependencies] | |||
protobuf = { version = "2", optional = true } | |||
protobuf-codegen = { version = "2", optional = true } | |||
protobuf = { package = "nrc-protobuf", version = "2", optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel worried about it, especially when using protobuf-build in grpc-rs. What's the problem of keeping using a branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means we can't publish kvproto, which blocks us publishing the Rust client.
I think I must make it a feature in any case because of grpcio-compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, what is "nrc-protobuf" 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a minor fork of rust-proto to use Prost naming conventions and adding support for some TiKV-specific pretty printing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel it right to let rust client to depend on a forked version of rust-proto either.
For "TiKV-specific thing", we can leave it inside TiKV project. For naming conventions, we better discussing with rust-protobuf project and get it merged into the project instead of creating a new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think they will accept the naming changes - it would be a big breaking change. OTOH, not using those changes makes supporting both Prost and rust-proto very messy.
I agree it is sub-optimal to use a forked version, but we are already doing that, the only change here is to use a published version of the fork.
And to clarify, if we want to publish KvProto, then we can't depend on Git repos - it is not allowed by crates.io. Whereas depending on a fork is sub-optimal, but not impossible (and we already use a forked version of GRPC among other things, which seems worse to me).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rust-protobuf supports customization, I don't think it has to be a breaking change.
Forked version of gRPC is not the same use case here. Almost all changes to the forked are just bugfix cherry-picks, we don't mean to introduce any custom features to the forked version. And it will not introduce a different crate or make different types.
This uses the same code as before, but uses it via crates.io, rather than Git.
PTAL @BusyJay @breeswish