alexliesenfeld / httpmock

HTTP mocking library for Rust.
MIT License
436 stars 40 forks source link

Build error caused by `futures-util=0.3.7` #21

Closed UebelAndre closed 3 years ago

UebelAndre commented 3 years ago

I feel like futures-rs messed up by making that update a patch version change only but alas, It would be great to have this fixed.

httpmock % cargo test
   Compiling httpmock v0.5.1-alpha.0 (/Users/user/Code/httpmock)
error[E0433]: failed to resolve: could not find `core_reexport` in `futures_util`
   --> src/lib.rs:202:19
    |
202 | use futures_util::core_reexport::time::Duration;
    |                   ^^^^^^^^^^^^^ could not find `core_reexport` in `futures_util`

error[E0433]: failed to resolve: could not find `core_reexport` in `futures_util`
   --> src/lib.rs:202:19
    |
202 | use futures_util::core_reexport::time::Duration;
    |                   ^^^^^^^^^^^^^ could not find `core_reexport` in `futures_util`

error[E0412]: cannot find type `Duration` in this scope
    --> src/lib.rs:1407:26
     |
1407 |     pub fn delay<D: Into<Duration>>(self, duration: D) -> Self {
     |                          ^^^^^^^^ not found in this scope
     |
help: consider importing one of these items
     |
196  | use core::time::Duration;
     |
196  | use crate::data::Duration;
     |
196  | use std::time::Duration;
     |
196  | use tokio::time::Duration;
     |

error[E0412]: cannot find type `Duration` in this scope
    --> src/lib.rs:1407:26
     |
1407 |     pub fn delay<D: Into<Duration>>(self, duration: D) -> Self {
     |                          ^^^^^^^^ not found in this scope
     |
help: consider importing one of these items
     |
196  | use core::time::Duration;
     |
196  | use crate::data::Duration;
     |
196  | use std::time::Duration;
     |
196  | use tokio::time::Duration;
     |

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `httpmock`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: build failed

I also noticed a BUNCH of packages are out of date. Do you think it'd be possible to update them and as a check for any lingering uses of "deprecated" code?

UebelAndre commented 3 years ago

20 seems to be a solution for this problem

alexliesenfeld commented 3 years ago

Yes, merged #20 into #19 which will fix this problem. Thanks! I fixated all dependency versions in #19 so this should not happen again.

UebelAndre commented 3 years ago

Thanks! Any timeline for a 0.5.1 release?

alexliesenfeld commented 3 years ago

Yes, I am waiting for CI test results and will release then.

alexliesenfeld commented 3 years ago

Fixed in 0.5.1 .