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 Jan 30, 2019
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>
ice1000 added 5 commits Apr 4, 2019
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 ice1000 commented Apr 4, 2019

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

@nrc
Copy link
Collaborator

@nrc 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 ice1000 commented Apr 4, 2019

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

ice1000 added 3 commits Apr 4, 2019
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Copy link
Collaborator

@nrc nrc left a comment

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 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>
@nrc
nrc approved these changes Apr 4, 2019
Copy link
Collaborator

@nrc nrc left a comment

LGTM \o/

@nrc
Copy link
Collaborator

@nrc nrc commented Apr 4, 2019

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

Copy link
Contributor

@Hoverbear Hoverbear left a comment

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 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
@nrc nrc merged commit fc6c059 into tikv:master Apr 11, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ice1000 ice1000 deleted the ice1000:prost branch Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants