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

Pinned dependency with rust-version defined is causing a version downgrade instead of ugprade #860

Closed
hackaugusto opened this issue Jun 29, 2023 · 3 comments

Comments

@hackaugusto
Copy link

hackaugusto commented Jun 29, 2023

With this Cargo.toml:

[package]
name = "example"
version = "0.1.0"
edition = "2021"
rust-version = "1.65"

[dependencies]
winter-utils = { version = "0.5.1", package = "winter-utils" }

and running cargo upgrade --pinned, I get the following:

name                        old req compatible latest new req
====                        ======= ========== ====== =======
winter-utils (winter-utils) 0.5.1   -          0.4.2  0.4.2

The latest version is actually 0.6.4

> cargo upgrade --version
cargo-edit-upgrade 0.12.0
> cargo --version
cargo 1.69.0 (6e9a83356 2023-04-12)

edit: also tested with cargo 1.70.0 (ec8a8a0ca 2023-04-25)

@hackaugusto
Copy link
Author

hackaugusto commented Jun 29, 2023

Humm, it seems the behavior is correct. The version 0.4.2 is the latest version of that packaged that is compatible with 1.65, from 0.5.0 it requires 1.67.

It would be nice to be able to use cargo upgrade to bump the rust-version instead of downgrading the dependency. Or to have some sort of message explaining why the downgrade happened.

This is the current full output:

    Updating 'https://github.com/rust-lang/crates.io-index' index
    Checking example's dependencies
name                        old req compatible latest new req
====                        ======= ========== ====== =======
winter-utils (winter-utils) 0.5.1   -          0.4.2  0.4.2
   Upgrading recursive dependencies

@epage
Copy link
Collaborator

epage commented Jun 29, 2023

We normally report why a version is being held back. #857 covers adding that for MSRV.

You can pass in --ignore-rust-version to upgrade anyways.

@hackaugusto
Copy link
Author

hackaugusto commented Jun 29, 2023

@epage thank you for the reply! To clarify, the version change was not held back, it was downgraded instead.

I guess this is a duplicate of #857, closing it.

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

2 participants