LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
624 stars 72 forks source link

error: could not compile `wiremock` #126

Closed carrycooldude closed 1 year ago

carrycooldude commented 1 year ago

Proposal

error[E0658]: use of unstable library feature 'pin_macro' --> /home/kartikey/.cargo/registry/src/github.com-1ecc6299db9ec823/wiremock-0.5.19/src/mock_server/bare_server.rs:247:32 247 let mut notification = pin!(notify.notified()); ^^^
= note: see issue #93178 <https://github.com/rust-lang/rust/issues/93178> for more information

Checking fake v2.8.0
error[E0658]: use of unstable library feature 'pin_macro' --> /home/kartikey/.cargo/registry/src/github.com-1ecc6299db9ec823/wiremock-0.5.19/src/mock_server/bare_server.rs:6:5 6 use std::pin::pin; ^^^^^^^^^^^^^

= note: see issue #93178 https://github.com/rust-lang/rust/issues/93178 for more information

Reproduction steps

cargo clippy --all-features --all-targets

While running this cmd on this project https://github.com/carrycooldude/hyperswitch.git

References

No response

LukeMathWalker commented 1 year ago

You need to update your installation of Rust to use a more recent version of the compiler.

rustup update should be enough, assuming you installed it via rustup.

carrycooldude commented 1 year ago

You need to update your installation of Rust to use a more recent version of the compiler.

rustup update should be enough, assuming you installed it via rustup.

I tried that too but still it's not working

LukeMathWalker commented 1 year ago

What does cargo --version return?

carrycooldude commented 1 year ago

What does cargo --version return?

cargo 1.66.0 (d65d197ad 2022-11-15)
LukeMathWalker commented 1 year ago

The latest is 1.72.0—you need to sort out your installation, this has nothing to do with wiremock.

vasilakisfil commented 1 year ago

@LukeMathWalker this actually has to do with wiremock. It needs to specify the minimum rust version in Cargo.toml or at least in documentation. Note that not everyone can update to latest Rust version for various reasons.

LukeMathWalker commented 1 year ago

You're correct, my wording was not precise.

Let me clarify: wiremock does not guarantee an MSRV, therefore when you see those kinds of error messages the expectation is that you update your toolchain.
If you don't want to, you need to pin a version old enough to be compatible with your toolchain of choice.

vasilakisfil commented 1 year ago

I understand that for wiremock is a bit early to guarantee an MSRV and breaking changes regarding that could happen even on minor versions, however, specifying a minimum Rust version in Cargo.toml or in releases could help us track down which version we could pin to.

carrycooldude commented 1 year ago

I understand that for wiremock is a bit early to guarantee an MSRV and breaking changes regarding that could happen even on minor versions, however, specifying a minimum Rust version in Cargo.toml or in releases could help us track down which version we could pin to.

I will surely try this one