erikgrinaker / toydb

Distributed SQL database in Rust, written as an educational project
Apache License 2.0
6.12k stars 564 forks source link

Update crates to the latest version #47

Closed iamazy closed 3 years ago

iamazy commented 3 years ago

Major changes

  1. Tokio move out stream to tokio-stream
  2. tokio::mpsc::Receiver,tokio::mpsc::UnboundedReceiver,tokio::net::TcpListener no longer implement trait tokio::stream::StreamExt, need to convert them to tokio_stream::wrappers::{ReceiverStream, UnboundedReceiverStream,TcpListenerStream}
  3. See tokio#3263 and get the reason why remove try_recv() from mpsc types. Temporary solution is use recv().now_or_never() and will change it back in the future (see tokio#3350 for more details).
erikgrinaker commented 3 years ago

Thanks, this is great! However, it looks like we'll have to bump lexical-core again to compile with rustc 1.53.0, otherwise I'm getting these compilation errors:

$ cargo build
[...]
error[E0308]: mismatched types
  --> /Users/erik/.cargo/registry/src/github.com-1ecc6299db9ec823/lexical-core-0.7.4/src/atof/algorithm/bhcomp.rs:62:24
   |
62 |     let bytes = bits / Limb::BITS;
   |                        ^^^^^^^^^^ expected `usize`, found `u32`
iamazy commented 3 years ago

@erikgrinaker Thanks,I used rustc 1.49.0 and I got no error when I run cargo build and cargo test. Now my rustc update to 1.53.0, I did got the error what you list. I found that lexical-core is dependency of config crate, temporary solution is list lexical-core in Cargo.toml, when config crate updates its lexical-core dependency, can remove it again.

erikgrinaker commented 3 years ago

I found that lexical-core is dependency of config crate, temporary solution is list lexical-core in Cargo.toml, when config crate updates its lexical-core dependency, can remove it again.

Thanks! I don't think that's necessary though, a simple cargo update solved it for me by bumping it in Cargo.lock.

iamazy commented 3 years ago

Thanks! I don't think that's necessary though, a simple cargo update solved it for me by bumping it in Cargo.lock.

Thanks, It do work. It seems that I should read cargo book haha :)

erikgrinaker commented 3 years ago

Haha, no worries. Thanks again!