rust-s3 icon indicating copy to clipboard operation
rust-s3 copied to clipboard

Some feature combinations no longer compile

Open nyurik opened this issue 1 year ago • 3 comments

Describe the bug

This worked ok in v0.33.0, but fails in v0.34.0.

cargo check --no-default-features --features tokio-native-tls

To Reproduce

git checkout v0.33.0
# works fine
cargo check --no-default-features --features tokio-native-tls
git checkout v0.34.0
# no longer compiles
cargo check --no-default-features --features tokio-native-tls

Expected behavior All combinations of non-default features should be compilable, and preferably without any warnings

Environment

  • Rust version: rustc 1.79.0 (129f3b996 2024-06-10)
  • lib version v0.34.0 or later

nyurik avatar Jun 26 '24 02:06 nyurik

A git bisect indicates this is the first bad commit: https://github.com/durch/rust-s3/commit/0ff4d612902519b7529d06ab564f75e9b222a70f

lseelenbinder avatar Jun 26 '24 08:06 lseelenbinder

I tried to figure out where to add a few more cargo check --no-default-features --features ... commands to the makefile, but got a bit lost there. BTW, I have been using just instead of make -- tends to be a bit cleaner, and now there are IDE and CI actions for that (but that's obviously not the blocker here :) )

nyurik avatar Jun 26 '24 13:06 nyurik

Since this also involves Tokio and a TLS setting, I wonder if there is any relation to #396.

emmiegit avatar Jun 28 '24 06:06 emmiegit

As off 0.35, all sane feature combinations should compile

durch avatar Aug 30 '24 20:08 durch

I feel like I am missing something -- I am trying to build with tokio and rustls but I am getting a compilation error in the crate itself. Here is a minimal Cargo.toml to reproduce:

[package]
name = "test2"
version = "0.1.0"
edition = "2021"

[dependencies]
rust-s3 = { version = "0.35", features = ["with-tokio", "tokio-rustls"], default-features = false }

When attempting to build, I'm getting this:

$ cargo check
   Compiling rustls v0.21.12
    Checking tokio-rustls v0.24.1
    Checking rust-s3 v0.35.1
error[E0599]: no method named `refresh` found for struct `tokio::sync::RwLockWriteGuard<'_, Credentials>` in the current scope
   --> /home/emmie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust-s3-0.35.1/src/bucket.rs:125:43
    |
125 |         Ok(self.credentials.write().await.refresh()?)
    |                                           ^^^^^^^ method not found in `RwLockWriteGuard<'_, Credentials>`

For more information about this error, try `rustc --explain E0599`.

Is this not a sane feature combination? If not, what is the preferred way to use Tokio and rustls?

emmiegit avatar Sep 01 '24 22:09 emmiegit