Skip to content

Workspace crates should have an implicit patch for crates in the workspace. #6126

@carllerche

Description

@carllerche

Whenever using workspace crates, I often end up having to add a list of patches in the root Cargo.toml for all the sub crates. For example, in tokio:

[patch.crates-io]
tokio = { path = "." }
tokio-async-await  = { path = "./tokio-async-await" }
tokio-codec = { path = "./tokio-codec" }
tokio-current-thread = { path = "./tokio-current-thread" }
tokio-executor = { path = "./tokio-executor" }
tokio-fs = { path = "./tokio-fs" }
tokio-io = { path = "./tokio-io" }
tokio-reactor = { path = "./tokio-reactor" }
tokio-signal = { path = "./tokio-signal" }
tokio-tcp = { path = "./tokio-tcp" }
tokio-threadpool = { path = "./tokio-threadpool" }
tokio-timer = { path = "./tokio-timer" }
tokio-tls = { path = "./tokio-tls" }
tokio-udp = { path = "./tokio-udp" }
tokio-uds = { path = "./tokio-uds" }

This is because, when compiling examples and benches (at least), the workspace crates are not, pulling from crates.io.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-patchArea: [patch] table overrideA-workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-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