Skip to content

Add cargo downgrade or cargo update --oldest #2463

Closed
@DanielKeep

Description

@DanielKeep

Currently, Cargo will try to use the newest version of dependencies when you invoke cargo update or just build for the first time. This is a pain when you're trying to write a package, as it means the version of dependencies listed in the manifest doesn't necessarily match the version of dependencies that are being tested/developed against.

As such, it would be very convenient if there was a shorthand command or switch that downgraded all dependencies of the current package to the earliest possible versions. For bonus points, it should signal an error if the version specified by a ^ (and possibly >=) constraint is not selectable (i.e. "you say I should be able to select plimsor="1.2.6", but I can't actually do so). Double bonus points for some persistent per-package option that makes this the default and/or prevents implicitly updating dependencies with some explicit override.

This should help keep package authors honest about what dependency versions their code actually works with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions