nlevitt / monie

man-in-the-middle http/https proxy library in rust
MIT License
32 stars 10 forks source link

can't compile anymore #2

Closed F1am3 closed 5 years ago

F1am3 commented 5 years ago

Hi, it shows me error when i try to compile the project. how to solve it?

Updating git repository `https://github.com/nlevitt/hyper`

error: failed to resolve patches for https://github.com/rust-lang/crates.io-index

Caused by: failed to load source for a dependency on hyper

Caused by: Unable to update https://github.com/nlevitt/hyper?branch=pub-pool#33790f88

Caused by: revspec '33790f880d8f605abc23bb9f865fba550ace56fe' not found; class=Reference (4); code=NotFound (-3)

nlevitt commented 5 years ago

Hmm, from your error message it looks like I might have broken your build by force-pushing my pub-pool branch of hyper. But the build still seems to work for me. What commands are you running exactly?

F1am3 commented 5 years ago

I did't change anything, just clone the project and build it. Maybe there's a cache on you machine, so u can build it. U can try to build this project on the new machine.

warning: Patch hyper v0.12.30 (https://github.com/nlevitt/hyper?branch=pub-pool#93eac998) was not used in the crate graph. Check that the patched package version and available features are compatible with the dependency requirements. If the patch has a different version from what is locked in the Cargo.lock file, run cargo update to use the new version. This may also occur with an optional dependency that is not enabled. ... error[E0599]: no method named connection_for found for type CLIENT in the current scope --> src/lib.rs:166:25 101 / lazy_static! { 102 static ref CLIENT: Client<HttpsConnector, Body> = 103 Client::builder().build(HttpsConnector::new(4)); 104 static ref HTTP: Http = Http::new(); 105 } _- method connection_for not found for this ... 166 let result = CLIENT.connection_for(uri, key1).map_err(move e { ^^^^^^^^^^^^^^
= note: the method `connection_for` exists but the following trait bounds were not satisfied:
        `hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector> : hyper::client::connect::Connect`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0308]: mismatched types --> src/lib.rs:103:33 103 Client::builder().build(HttpsConnector::new(4)); ^^^^^^^^^^^^^^^^^^^^^^ expected struct hyper::client::connect::http::HttpConnector, found a different struct hyper::client::connect::http::HttpConnector
= note: expected type `hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>` (struct `hyper::client::connect::http::HttpConnector`)
           found type `hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>` (struct `hyper::client::connect::http::HttpConnector`)

note: Perhaps two different versions of crate hyper are being used? --> src/lib.rs:103:33 | 103 | Client::builder().build(HttpsConnector::new(4)); | ^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>: hyper::client::connect::Connect is not satisfied --> src/lib.rs:103:27 | 103 | Client::builder().build(HttpsConnector::new(4)); | ^^^^^ the trait hyper::client::connect::Connect is not implemented for hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0308, E0599. For more information about an error, try rustc --explain E0277. error: Could not compile monie.

To learn more, run the command again with --verbose.

nlevitt commented 5 years ago

Ok I see. https://github.com/nlevitt/monie/commit/6f4063645680b023e81f108eccc17eef984c9d0c fixes it for me. Reopen if you still have trouble