Skip to content

[Request] Support shared dependency declaration in virtual manifests #5471

@phrohdoh

Description

@phrohdoh

Given a virtual manifest like so:

[workspace]
members = [
    "a",
    "b",
    "c",
    "d",
]

It would be useful to declare dependencies that are shared between members in a central place (such as this manifest):

[dependencies]
serde = "1.0.45"
serde_json = "1.0.17"
serde_derive = "1.0.45"

When building if we are looking for crate serde in, for example, package a but a/Cargo.toml @ dependencies does not list serde we would look in the virtual manifest that includes a as a member (if there is one).


This will no doubt complicate dependency resolution somewhat but I do not know to what extent so if it is too crazy please feel free to close this ticket.


The idea for this is that, at least in my experience, workspace members have certain shared deps that you want to stay in sync and this makes that easier to express.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crate-dependenciesArea: [dependencies] of any kindA-workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions