Skip to content

Cargo uses wrong dep version when dep is declared in [workspace.dependencies] #9682

@f32y

Description

@f32y

Problem

Steps
Workspace's Cargo.toml:

[workspace.dependencies]
arrayvec = { version = "0.7", features = ["serde"] }

Workspace member's Cargo.toml:

[dependencies]
arrayvec = { workspace = true }
  1. Remove git and registry in ~/.cargo to force cargo re-download all deps.
  2. Run cargo build
  3. The member crate uses arrayvec-0.4.12 rather than arrayvec-0.7.1

Possible Solution(s)

Notes

Output of cargo version: cargo 1.55.0-nightly (3ebb5f1 2021-07-02)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions