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

Latest cargo-credential-libsecret breaks cargo-udeps #228

Closed
smoelius opened this issue Nov 19, 2023 · 6 comments
Closed

Latest cargo-credential-libsecret breaks cargo-udeps #228

smoelius opened this issue Nov 19, 2023 · 6 comments

Comments

@smoelius
Copy link

Cloning cargo-udeps and running cargo update -p cargo-credential-libsecret && cargo check produces the output below. (Right now, crates.io tells me cargo-credential-libsecret is about three hours old.)

$ cargo update -p cargo-credential-libsecret && cargo check
    Updating crates.io index
      Adding cargo-credential v0.4.1
    Updating cargo-credential-libsecret v0.3.1 -> v0.3.2
    Updating serde v1.0.189 -> v1.0.192
    Updating serde_derive v1.0.189 -> v1.0.192
    Updating serde_json v1.0.107 -> v1.0.108
    Updating thiserror v1.0.49 -> v1.0.50
    Updating thiserror-impl v1.0.49 -> v1.0.50
    Checking cargo v0.74.0
error[E0277]: the trait bound `LibSecretCredential: cargo_credential::Credential` is not satisfied
   --> /Users/sam.moelius/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-0.74.0/src/cargo/util/auth/mod.rs:455:45
    |
455 |           let provider: Box<dyn Credential> = match process {
    |  _____________________________________________^
456 | |             "cargo:token" => Box::new(TokenCredential::new(config)),
457 | |             "cargo:paseto" => Box::new(PasetoCredential::new(config)),
458 | |             "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
...   |
462 | |             process => Box::new(CredentialProcessCredential::new(process)),
463 | |         };
    | |_________^ the trait `cargo_credential::Credential` is not implemented for `LibSecretCredential`
    |
help: trait impl with same name found
   --> /Users/sam.moelius/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-credential-0.4.1/src/lib.rs:61:1
    |
61  | impl Credential for UnsupportedCredential {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `cargo_credential` are being used?
    = help: the following other types implement trait `cargo_credential::Credential`:
              MacKeychain
              UnsupportedCredential
              BasicProcessCredential
              PasetoCredential<'a>
              CredentialProcessCredential
              TokenCredential<'a>
    = note: required for the cast from `std::boxed::Box<LibSecretCredential>` to `std::boxed::Box<dyn cargo_credential::Credential>`
@smoelius
Copy link
Author

Looks like the same bug: rust-lang/cargo#13002

(I probably should have opened this issue on the Cargo repo.)

@alice-i-cecile
Copy link

This fails for us in Bevy's CI too: https://github.com/bevyengine/bevy/actions/runs/6921162111/job/18826441217#step:5:537

@est31
Copy link
Owner

est31 commented Nov 20, 2023

It's due to the upstream issue mentioned above. TLDR they did semver breaking changes and only incremented the patch version.

There is an upstream PR: rust-lang/cargo#13004

I'm wondering what to do here:

  • If I do nothing, then users will be disrupted by this until this is fixed upstream
  • If I quickly update cargo, then I will have soon-to-be-yanked versions of the crates in my toml
  • I could publish an update in which I manually pin the versions. idk...

Do you think it's worth to cut a release just for this?

@smoelius
Copy link
Author

Do you think it's worth to cut a release just for this?

IMHO, it is fine to wait for the problem to be fixed upstream.

I apologize for making noise on your repo about a problem that is not yours.

@SIGSTACKFAULT
Copy link

rust-lang/cargo#13004 was just merged

@smoelius
Copy link
Author

rust-lang/cargo#13002 (comment)

The problem as I reported it no longer applies. Closing.

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

No branches or pull requests

4 participants