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

0.18.0/master doesnt compile with rust 1.39 #87

Closed
davidB opened this issue Nov 11, 2019 · 5 comments
Closed

0.18.0/master doesnt compile with rust 1.39 #87

davidB opened this issue Nov 11, 2019 · 5 comments

Comments

@davidB
Copy link
Contributor

davidB commented Nov 11, 2019

When compiling with 0.18.0 as a dependency, or the current master branch of kube-rs I got the following error:

...
   Compiling reqwest v0.10.0-alpha.1
error[E0277]: the trait bound `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>: futures_core::stream::Stream` is not satisfied
   --> /Users/d.bernard1/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.0-alpha.1/src/async_impl/response.rs:283:39
    |
283 |         if let Some(item) = self.body.next().await {
    |                                       ^^^^ the trait `futures_core::stream::Stream` is not implemented for `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>`
    |
    = note: required because of the requirements on the impl of `std::marker::Unpin` for `async_compression::stream::GzipDecoder<futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>>`
    = note: required because it appears within the type `async_impl::decoder::imp::Inner`
    = note: required because it appears within the type `async_impl::decoder::imp::Decoder`

error[E0277]: the trait bound `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>: futures_core::stream::Stream` is not satisfied
   --> /Users/d.bernard1/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.0-alpha.1/src/async_impl/response.rs:283:29
    |
283 |         if let Some(item) = self.body.next().await {
    |                             ^^^^^^^^^^^^^^^^^^^^^^ the trait `futures_core::stream::Stream` is not implemented for `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>`
    |
    = note: required because of the requirements on the impl of `std::marker::Unpin` for `async_compression::stream::GzipDecoder<futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>>`
    = note: required because it appears within the type `async_impl::decoder::imp::Inner`
    = note: required because it appears within the type `async_impl::decoder::imp::Decoder`
    = note: required because of the requirements on the impl of `core::future::future::Future` for `futures_util::stream::next::Next<'_, async_impl::decoder::imp::Decoder>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `reqwest`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@clux
Copy link
Member

clux commented Nov 11, 2019

Uh, that's strange. I swear it compiled earlier on stable. I'll have a look later on.

@CarlosLanderas
Copy link

Im having exactly the same problem.

rustup 1.20.2 (13979c968 2019-10-16)

rustc 1.40.0-nightly (1423bec54 2019-11-05)
rustc 1.39.0 (4560ea788 2019-11-04)

It is not compiling in nightly or stable either.

Just using this dependencies and code:

[dependencies]
kube = "0.18.0"
serde = "1.0.102"
serde_json = "1.0.41"
serde_derive = "1.0.102"
use kube:: {
    api::{Object, Void, RawApi},
    client::APIClient,
    config
};

use k8s_controller::book::Book;

type Kubebook = Object<Book, Void>;

fn main() {

    let kubeconfig = config::load_kube_config().expect("kubeconfig failed to load");

    let client = APIClient::new(kube);

    let namespace = "default";

    let resource = RawApi::customResource("books")
        .group("example.technosophos.com")
        .with(&namespace);
}
error[E0277]: the trait bound `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>: futures_core::stream::Stream` is not satisfied
   --> /home/clanderas/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.0-alpha.1/src/async_impl/response.rs:283:39
    |
283 |         if let Some(item) = self.body.next().await {
    |                                       ^^^^ the trait `futures_core::stream::Stream` is not implemented for `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>`
    |
    = note: required because of the requirements on the impl of `std::marker::Unpin` for `async_compression::stream::GzipDecoder<futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>>`
    = note: required because it appears within the type `async_impl::decoder::imp::Inner`
    = note: required because it appears within the type `async_impl::decoder::imp::Decoder`

error[E0277]: the trait bound `futures_util::stream::peek::Peekable<async_impl::decoder::imp::IoStream>: futures_core::stream::Stream` is not satisfied
   --> /home/clanderas/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.0-alpha.1/src/async_impl/response.rs:283:29

@clux
Copy link
Member

clux commented Nov 11, 2019

Confirmed, there is a cached dependency in my local Cargo.lock, and because I was waiting for circleci's official rustc 1.39.0 image, it went unnoticed. Trying to get to the bottom of it now.

@clux
Copy link
Member

clux commented Nov 11, 2019

Seems to arise due to the gzip feature in reqwest. Possibly related to seanmonstar/reqwest#703

@clux
Copy link
Member

clux commented Nov 11, 2019

Released a fix in 0.18.1. Does turn off gzip for now though :/

@clux clux closed this as completed Nov 11, 2019
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

3 participants