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

raft-rs in github is out of sync with the same version in crates.io #390

Closed
whfuyn opened this issue Aug 7, 2020 · 10 comments
Closed

raft-rs in github is out of sync with the same version in crates.io #390

whfuyn opened this issue Aug 7, 2020 · 10 comments

Comments

@whfuyn
Copy link

whfuyn commented Aug 7, 2020

Hi, I was recently using raft-rs in my project. I added raft-rs = "0.6.0-alpha" in my Cargo.toml, and followed the examples to write my own server. But it turned out some field and methods were missing, like

        s.mut_metadata().mut_conf_state().voters = vec![1]; // no voters
        store.wl().set_conf_state(cs); // no wl

After some painful investigations, I found that the raft-rs in .Cargo/registry/src/github.com.../raft-0.6.0-alpha were different from the one I saw in github, which didn't use voters in the example, and the proto file weren't the same too.

Maybe it needs an update? It really confuses an inexperience user like me since it has the same version.

@Fullstop000
Copy link
Member

Fullstop000 commented Aug 7, 2020

@whfuyn You can get rid of it by adding things below in your Cargo.toml

[dependencies]
raft = "0.6.0-alpha"

[patch.crates-io]
raft = { git = "https://github.com/tikv/raft-rs", branch = "master", default-features = false }
raft-proto = { git = "https://github.com/tikv/raft-rs", branch = "master", default-features = false }

Though this is just a tmp solution.

@BusyJay
Copy link
Member

BusyJay commented Aug 7, 2020

We are planning release 0.6.0 this month. The current release blocker is #378.

@whfuyn
Copy link
Author

whfuyn commented Aug 7, 2020

@Fullstop000 Thanks! I am using that solution.
Another problem I encountered is the #![rustfmt::skip] in the generated eraftpb.rs that requires #![feature(custom_inner_attributes)], I just manually remove it. Maybe fix it in the next release?

@BusyJay
Copy link
Member

BusyJay commented Aug 7, 2020

@nrc Do you have any idea how to address the problem?

@nrc
Copy link
Contributor

nrc commented Aug 14, 2020

I actually don't know where that rustfmt::skip is coming from? The solution is to not emit it and if necessary use the outer attribute equivalent on the protos module.

@BusyJay
Copy link
Member

BusyJay commented Aug 14, 2020

It's generated by rust-protobuf to avoid formatting generated code.

nrc added a commit to nrc/grpc-rs that referenced this issue Aug 14, 2020
@nrc
Copy link
Contributor

nrc commented Aug 14, 2020

Fixed in tikv/grpc-rs#479, we'll need to release a new version and to fix things here.

nrc added a commit to tikv/grpc-rs that referenced this issue Aug 25, 2020
@chen-zhuohan
Copy link

Now it's December, where is my release 0.6.0?

@BusyJay
Copy link
Member

BusyJay commented Dec 29, 2020

There is still a known bug in master, we will fix it before releasing. Sorry for the delay, we have been put a lot of effort in the new design of joint consensus and async ready.

@BusyJay
Copy link
Member

BusyJay commented Jun 16, 2021

0.6.0 was just released.

@BusyJay BusyJay closed this as completed Jun 16, 2021
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

No branches or pull requests

5 participants