-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Patch section in a separate file #10832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Patches can also be specified in a config file. Does that work for you? |
Oh indeed, it's perfect. Sorry for the noise ... |
By the way, maybe the documentation part about Overriding Dependencies is a little bit out of date, because Should I open a new issue about documentation update? |
Nah, I just opened a quick PR at #10836 to include it in the docs. Thanks for the suggestion! I completely missed that we didn't update that chapter. (Config support was just recently added.) |
Mention `[patch]` config in "Overriding Dependencies" The "Overriding Dependencies" chapter is the primary documentation for the `[patch]` table, but it does not mention that `[patch]` also works in config files. This adds a note to mention this option. cc #10832 (comment)
Problem
I would like to use
patch
section to do local development, patching a dependency to use apath
. However I don't want to polluteCargo.toml
with local/temporary stuff, becauseCargo.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 thepatch
section ofCargo.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
The text was updated successfully, but these errors were encountered: