Skip to content

Patch section in a separate file #10832

@wyfo

Description

@wyfo

Problem

I would like to use patch section to do local development, patching a dependency to use a path. However I don't want to pollute Cargo.toml with local/temporary stuff, because Cargo.toml is versioned.

Proposed Solution

Allow for a new file, named Cargo-patch.toml (or whatever name better suited). When the file is present, its content is added to the patch section of Cargo.toml, overriding items present in both files.

This feature could be turned off (with an environment variable for example) to use unpatched Cargo.toml with tools like pre-commit.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-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