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

Use a published version of the rust-proto branch #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nrc
Copy link
Collaborator

@nrc nrc commented Dec 1, 2019

This uses the same code as before, but uses it via crates.io, rather than Git.

PTAL @BusyJay @breeswish

This uses the same code as before, but uses it via crates.io, rather than Git.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
@nrc nrc requested review from BusyJay and breezewish December 1, 2019 08:02
@@ -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 }
Copy link
Member

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?

Copy link
Collaborator Author

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.

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" 😭

Copy link
Collaborator Author

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

Copy link
Member

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.

Copy link
Collaborator Author

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).

Copy link
Member

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.

https://github.com/stepancheg/rust-protobuf/blob/53dc4ae8b2d20b3e6cb971c68042968a45d23882/protobuf-codegen/src/customize.rs#L10-L44

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.

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

Successfully merging this pull request may close these issues.

4 participants