Skip to content

Replace rust-protobuf with prost#201

Merged
nrc merged 58 commits intotikv:masterfrom
ice1000:prost
Apr 11, 2019
Merged

Replace rust-protobuf with prost#201
nrc merged 58 commits intotikv:masterfrom
ice1000:prost

Conversation

@ice1000
Copy link
Copy Markdown
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>
ice1000 added 6 commits April 4, 2019 11:59
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
Copy Markdown
Contributor Author

ice1000 commented Apr 4, 2019

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

@nrc
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

ice1000 commented Apr 4, 2019

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

ice1000 added 3 commits April 4, 2019 16:37
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
Copy link
Copy Markdown
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

@ice1000
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

nrc commented Apr 4, 2019

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

Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants