Skip to content

fix(cargo): Bump dependencies so that Tokio compiles with minimal versions#258

Merged
carllerche merged 1 commit intotokio-rs:masterfrom
klausi:minimal-versions
Mar 27, 2018
Merged

fix(cargo): Bump dependencies so that Tokio compiles with minimal versions#258
carllerche merged 1 commit intotokio-rs:masterfrom
klausi:minimal-versions

Conversation

@klausi
Copy link
Copy Markdown
Contributor

@klausi klausi commented Mar 23, 2018

I'm working on minimal version installer for cargo, turns out some dependencies are out of date:

cargo build -Z minimal-versions
   Compiling libc v0.1.0
error: expected identifier, found `"std"`
  --> /home/klausi/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.0/rust/src/liblibc/lib.rs:76:46
   |
76 | #[cfg(feature = "cargo-build")] extern crate "std" as core;
   |                                              ^^^^^ expected identifier

error: aborting due to previous error

error: Could not compile `libc`.

   Compiling bytes v0.4.0                                                       
error[E0432]: unresolved import `bytes::buf::Chain`
 --> tokio-io/src/length_delimited.rs:4:5
  |
4 | use bytes::buf::Chain;
  |     ^^^^^^^^^^^^^^^^^ no `Chain` in `buf`

Updating log to 0.4 as in the other tokio crates here and updating bytes to fix the type errors.

@carllerche
Copy link
Copy Markdown
Member

Thanks for the report! A minimal version installer would definitely be helpful to catch these issues.

@klausi
Copy link
Copy Markdown
Contributor Author

klausi commented Mar 23, 2018

Yep, we are almost there at rust-lang/cargo#5200 :-)

@carllerche
Copy link
Copy Markdown
Member

Would you be able to merge master? This should hopefully fix CI.

@klausi klausi force-pushed the minimal-versions branch from 49b561c to c5f213f Compare March 25, 2018 09:46
@klausi
Copy link
Copy Markdown
Contributor Author

klausi commented Mar 25, 2018

Done, rebased this on master.

Ideally we should add cargo build -Z minimal-versions somewhere in the Travis CI config, but that does not work yet on Rust nightly:

$ cargo build -Z minimal-versions
error: unknown `-Z` flag specified: minimal-versions
$ cargo --version
cargo 1.26.0-nightly (d10ec661b 2018-03-20)

I need to find out when cargo nightly is pushed downstream to Rust nightly.

@carllerche
Copy link
Copy Markdown
Member

Thanks. It should be soon. Let's see if it lands tomorrow.

@carllerche
Copy link
Copy Markdown
Member

Did this land?

@carllerche carllerche merged commit a612736 into tokio-rs:master Mar 27, 2018
@carllerche
Copy link
Copy Markdown
Member

I merged, but I would love to get this added to CI.

@Eh2406
Copy link
Copy Markdown

Eh2406 commented Jun 26, 2018

ping! it is on nightly (for a while now) feel free to add it to CI!

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

Successfully merging this pull request may close these issues.

3 participants