0xSiO / bolt-rs

Communicate with Bolt-compatible graph databases in Rust! ⚡🔩
Mozilla Public License 2.0
80 stars 7 forks source link

bolt-client v0.8.0 fails to build. bolt-proto v0.9.2 has incompatible with v0.9.1 change. #7

Closed s-oleinik closed 3 years ago

s-oleinik commented 3 years ago

First of all - thank you for the work you do!

As title said - bolt-client v0.8.0 fails to compile with bolt-proto v0.9.2

I believe error is in bolt-client's dependency on bolt-proto bolt-proto = "^0.9.0" //this will pick latest...

I had to lock bolt-proto with "cargo update -p bolt-proto --precise 0.9.1"

cargo tree | grep bolt ├── bb8-bolt v0.5.0 │ ├── bolt-client v0.8.0 │ │ ├── bolt-client-macros v0.2.1 (proc-macro) │ │ ├── bolt-proto v0.9.2 │ │ │ ├── bolt-proto-derive v0.5.2 (proc-macro) │ ├── bolt-proto v0.9.2 () ├── bolt-client v0.8.0 () ├── bolt-proto v0.9.2 (*)

==================== Build error ============================================== Compiling bolt-client v0.8.0 error[E0277]: the trait bound Vec<bytes::Bytes>: From<bolt_proto::Message> is not satisfied --> /home/soleinik/.cargo/registry/src/github.com-1ecc6299db9ec823/bolt-client-0.8.0/src/client.rs:75:42 75 let chunks: Vec = message.try_into()?; ^^^^^^^^ the trait From<bolt_proto::Message> is not implemented for Vec<bytes::Bytes>

= help: the following implementations were found: <Vec<T, A> as From<Box<[T], A>>> <Vec as From<&[T]>> <Vec as From<&mut [T]>> <Vec as From<BinaryHeap>> and 6 others = note: required because of the requirements on the impl of Into<Vec<bytes::Bytes>> for bolt_proto::Message = note: required because of the requirements on the impl of TryFrom<bolt_proto::Message> for Vec<bytes::Bytes>

0xSiO commented 3 years ago

Thank you Serguei! This was caused by bolt-proto exporting bytes::Bytes in its public API, so upgrading to bytes v1 ended up being a breaking change that I didn't catch. I've yanked any broken crates and published updates for bolt-proto, bolt-client, and bb8-bolt to hopefully fix this. Let me know if you see any other build issues.

s-oleinik commented 3 years ago

Hello Luc - this is fixed, everything builds - thank you very much!

Cargo.toml bolt-proto = "^0.9.0" bolt-client = "^0.8.0" bb8 = "^0.4.2" bb8-bolt = "^0.5.0"

cargo tree | grep bolt ├── bb8-bolt v0.5.0 │ ├── bolt-client v0.8.0 │ │ ├── bolt-client-macros v0.2.1 (proc-macro) │ │ ├── bolt-proto v0.9.1 │ │ │ ├── bolt-proto-derive v0.5.2 (proc-macro) │ ├── bolt-proto v0.9.1 () ├── bolt-client v0.8.0 () ├── bolt-proto v0.9.1 (*)