Skip to content

Use the same version of a transitive dependency #14316

Open
@oriongonza

Description

@oriongonza

Problem

Let's say that I'm using

[dependencies]
reqwest = "0.12.5"
axum = "0.7.5"

But I also want to add tokio as a direct dependency, and I want to match the version that axum uses.
Specifying * as the version could choose either.

Proposed Solution

Something like this

[dependencies]
reqwest = "0.12.5"
axum = "0.7.5"
tokio = "axum"

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dependency-resolutionArea: dependency resolution and the resolverA-manifestArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fixS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions