Hyper: Can not compile latest master

Created on 7 Aug 2019  路  4Comments  路  Source: hyperium/hyper

After I run cargo update hyper no longer compiles. I'm using git version of both hyper and tokio.

   Compiling tokio v0.2.0 (https://github.com/tokio-rs/tokio#47e2ff48)
   Compiling hyper v0.13.0-a.0 (https://github.com/hyperium/hyper.git#a543c8ee)
error[E0599]: no method named `poll_ref` found for type `tokio_sync::watch::Receiver<common::drain::Action>` in the current scope
   --> /home/tomas/.cargo/git/checkouts/hyper-817b53a166fc1c58/a543c8e/src/common/drain.rs:102:39
    |
102 |                     match me.watch.rx.poll_ref(cx) {
    |                                       ^^^^^^^^

error[E0624]: method `poll_accept` is private
   --> /home/tomas/.cargo/git/checkouts/hyper-817b53a166fc1c58/a543c8e/src/server/tcp.rs:109:48
    |
109 |             match Pin::new(&mut self.listener).poll_accept(cx) {
    |                                                ^^^^^^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0599, E0624.
For more information about an error, try `rustc --explain E0599`.
error: Could not compile `hyper`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Rust version

tomas@LAPTOP-A0DA8LB3:~/development/tezos-rs$ rustup show
Default host: x86_64-unknown-linux-gnu

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.38.0-nightly (6a91782b7 2019-08-06)

Most helpful comment

you can also cargo patch hyper tokio dependency on Cargo.toml

[patch."https://github.com/tokio-rs/tokio"]
tokio = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-executor = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-io = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-reactor = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-sync = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-tcp = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-timer = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-threadpool = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-tls = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }


All 4 comments

Ran into the same issue, implemented a work around in #1890

you can also cargo patch hyper tokio dependency on Cargo.toml

[patch."https://github.com/tokio-rs/tokio"]
tokio = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-executor = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-io = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-reactor = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-sync = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-tcp = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-timer = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-threadpool = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }
tokio-tls = { git = "https://github.com/tokio-rs/tokio.git", rev = "6cbe3d4f82f2c10be108366ece63e1fb180c90b9" }


Update to use tokio-0.2.0-alpha.1 instead of from git #1893 tokio-0.2.0-alpha.1

This should be fixed on master now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zonyitoo picture zonyitoo  路  4Comments

nate-onesignal picture nate-onesignal  路  3Comments

gabisurita picture gabisurita  路  4Comments

belst picture belst  路  3Comments

da2018 picture da2018  路  3Comments