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

Replace rust-protobuf with prost #201

Merged
merged 58 commits into from Apr 11, 2019
Merged

Replace rust-protobuf with prost #201

merged 58 commits into from Apr 11, 2019

Conversation

ice1000
Copy link
Contributor

@ice1000 ice1000 commented Mar 30, 2019

This PR:

  • Introduce prost dependencies
  • Added build.rs to (re)generate prost structs and their corresponding protobuf wrappers (thanks to @nrc!)
  • The generated wrappers are manually edited a little bit, please don't run regenerate yourself ATM
  • Passed all tests by changing direct usages of protobuf APIs into prost APIs

I suppose test-passing means ready-for-review, please leave your comments!

ice1000 and others added 30 commits January 31, 2019 06:41
See pingcap/kvproto#349

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Conflicts:
Cargo.toml
generate-proto.sh
src/lib.rs
src/storage.rs
src/util.rs
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
…ecause their constructors are private

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
@ice1000
Copy link
Contributor Author

ice1000 commented Apr 4, 2019

The rest of the refactoring depends on tikv/protobuf-build#2

@nrc
Copy link
Contributor

nrc commented Apr 4, 2019

The rest of the refactoring depends on tikv/protobuf-build#2

For at least the proto which is exported via kvproto, the Message impl is used by TiKV, so I think we need to keep those Message impls around for now.

@ice1000
Copy link
Contributor Author

ice1000 commented Apr 4, 2019

That sounds reasonable. I'll add the protobuf stuff back.

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Copy link
Contributor

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just two very minor things remaining

src/errors.rs Show resolved Hide resolved
src/storage.rs Outdated Show resolved Hide resolved
@ice1000
Copy link
Contributor Author

ice1000 commented Apr 4, 2019

Test failing because

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I have no idea about this.

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Copy link
Contributor

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM \o/

@nrc
Copy link
Contributor

nrc commented Apr 4, 2019

Travis is failing on Windows only, @Hoverbear can we ignore that?

Copy link
Contributor

@Hoverbear Hoverbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the vast majority of these changes are fairly mechanical. After chatting a bit and investigating the situation around new_() (which I do not like!) and how we'll fix the situation, I feel this is a good step of progress to merge.

I would prefer if we rapidly move to a state where we have functions without this naming convention. Preferably before 0.6.0

@Hoverbear
Copy link
Contributor

Hoverbear commented Apr 9, 2019

@nrc We cannot! But this failure is related to travis, not you. We can force a few rebuilds and it should be green. I'll shepherd it.

@Hoverbear Hoverbear added this to the 0.6.0 milestone Apr 9, 2019
@Hoverbear Hoverbear added the Feature Related to a major feature. label Apr 9, 2019
@nrc nrc merged commit fc6c059 into tikv:master Apr 11, 2019
@ice1000 ice1000 deleted the prost branch April 13, 2019 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Related to a major feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants