paritytech / cachepot

cachepot is `sccache` with extra sec, which in turn is `ccache` with cloud storage
https://cachepot.cc
Apache License 2.0
171 stars 15 forks source link

Rust nightly maintenance: bad future, macro semicolons, clippy fixes #104

Closed xrl closed 2 years ago

xrl commented 3 years ago

I was getting issues with building this in my CI using a recent nightly:

error[E0277]: `()` is not a future
    --> src/server.rs:1200:33
     |
1200 | ...                   me.dist_client.reset_state().await;
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not a future
     |
     = help: the trait `futures::Future` is not implemented for `()`

fixed that by just dropping the semicolon.

and I was flooded with warnings so I addressed those with clippy --fix and some manual macro tweaking.

xrl commented 3 years ago

The macro warning:

1184 |         cannot_cache!("crate-type", "No crate-type passed".to_owned())
     |         -------------------------------------------------------------- in this macro invocation
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
     = note: macro invocations at the end of a block are treated as expressions
     = note: to ignore the value produced by the macro, add a semicolon after the invocation of `cannot_cache`
     = note: this warning originates in the macro `cannot_cache` (in Nightly builds, run with -Z macro-backtrace for more info)
xrl commented 3 years ago

This work may be more related to how I am installing cachepot: cargo install $GIT_URL --no-default-features --features=s3 which appears to be deactivating a required code path.

drahnr commented 2 years ago

Sorry for the long delay @xrl - I just verified the changeset, and you've found some issue in our CI coverage. Could you format the changeset, I'd be happy to merge this right after . Thank you!