tikv / raft-rs

Raft distributed consensus algorithm implemented in Rust.
Apache License 2.0
2.93k stars 394 forks source link

build: force use latest protobuf-build #510

Closed tisonkun closed 1 year ago

tisonkun commented 1 year ago

I'm unsure the resolving rules here but it seems 0.7.0 raft-proto possibly resolve 0.14.0 protobuf-build when building TiKV:

error: failed to run custom build command for `raft-proto v0.7.0 (https://github.com/tikv/raft-rs?branch=master#f7376671)`

Caused by:
  process didn't exit successfully: `/Users/tison/Brittani/tikv/target/debug/build/raft-proto-b62429cc873a021e/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/protobuf-build-0.14.0/src/protobuf_impl.rs:48:71
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:575:5
     1: core::panicking::panic_fmt
               at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:65:14
     2: core::panicking::panic
               at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:114:5
     3: core::option::Option<T>::unwrap
     4: protobuf_build::protobuf_impl::check_protoc_version
     5: protobuf_build::protobuf_impl::get_protoc
     6: protobuf_build::protobuf_impl::<impl protobuf_build::Builder>::generate_files
     7: protobuf_build::Builder::generate
     8: build_script_build::main
     9: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...

cc @BusyJay

tisonkun commented 1 year ago

@BusyJay Thanks for your review!

However, there can be some more issues on protobuf-build (see https://github.com/tikv/protobuf-build/pull/67) so perhaps we postpone to upgrade to that new version.

tisonkun commented 1 year ago

Maybe we can release a 0.15.0 now and upgrade downsteams like raft-rs and tikv.

tisonkun commented 1 year ago

Looks good now. Pending to merging...

Since TiKV depend on this project with git ref, perhaps we don't have to do a release.

tisonkun commented 1 year ago

Merging...