Skip to content

cargo publish of a [lib] fails when dependencies exist newer than my toolchain version #13306

@epage

Description

@epage

Problem

Captured from https://internals.rust-lang.org/t/pre-rfc-msrv-aware-resolver/19871/65?u=epage

I had a very unpleasant experience:

I work on old version of Rust, usually I develop my library with dependencies by:

cargo +nightly -Z minimal-versions update

But when I publish my library by cargo publish, I got:

Caused by:
 package `home v0.5.9` cannot be built because it requires rustc 1.70.0 or newer, while the currently active rustc version is 1.65.0

Is there cargo publish update dependencies by -Z minimal-versions, or it's best to update the dependent version based on the rust-version.

Proposed Solution

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-packageCommand-publishS-needs-team-inputStatus: Needs input from team on whether/how to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions