Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some feature combinations no longer compile #395

Closed
nyurik opened this issue Jun 26, 2024 · 5 comments
Closed

Some feature combinations no longer compile #395

nyurik opened this issue Jun 26, 2024 · 5 comments
Assignees
Labels

Comments

@nyurik
Copy link

nyurik commented Jun 26, 2024

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
@lseelenbinder
Copy link

A git bisect indicates this is the first bad commit: 0ff4d61

@nyurik
Copy link
Author

nyurik commented Jun 26, 2024

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 :) )

@emmiegit
Copy link

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

@durch
Copy link
Owner

durch commented Aug 30, 2024

As off 0.35, all sane feature combinations should compile

@durch durch closed this as completed Aug 30, 2024
@emmiegit
Copy link

emmiegit commented Sep 1, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants