LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
620 stars 70 forks source link

Not compiling due to future-util-0.3.5 dependency error #32

Closed ifraixedes closed 3 years ago

ifraixedes commented 3 years ago

Hello there,

I've just wanted to start to use this crate in some tool that I'm developing and when I added the crate to Cargo.toml and I haven't modified any source my tests stop compiling.

The error that I've got is

error[E0432]: unresolved import `futures_core::core_reexport`
  --> /home/ivan/persistent/rust/cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/lib.rs:51:9
   |                           
51 | pub use futures_core::core_reexport;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `core_reexport` in the root                      

error: aborting due to previous error                                                        

For more information about this error, try `rustc --explain E0432`.
error: could not compile `futures-util`

I'm using the last Rust stable release 1.48.0. I've got it run my tests without error adding explicitly the futures-util dependency but to the last published release 0.3.8.

I'm a newbie in Rust, so I'm not sure what's going but, perhaps, the solution is just only bumping the dependency.

Thank you very much for your attention.

LukeMathWalker commented 3 years ago

Have you tried just running cargo update without adding any new dependency to your Cargo.toml?

ifraixedes commented 3 years ago

Have you tried just running cargo update without adding any new dependency to your Cargo.toml?

No, but I will do it and I will report.

ifraixedes commented 3 years ago

I've removed the futures-util dependency that I added yesterday to Cargo.toml for solving the issue temporarily and then I've run cargo clean and then again cargo test and it's worked.

I've seen that when doing cargo test the futures-util: 0.3.8 dependency has been installed so basically it has installed the last published version automatically.

Thank you for your help.