-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Problem
Currently "The [patch]
section" mentions how you can override dependencies in Config.toml
. Below, under "paths
overrides" an alternative approach is documented for config.toml
.
However, what the documentation does not make very clear is that you can also put a [patch]
section in config.toml
.
What the documentation does have is this tiny note:
Note: The
[patch]
table can also be specified as a configuration option, such as in a.cargo/config.toml
file or a CLI option like--config 'patch.crates-io.rand.path="rand"'
. This can be useful for local-only changes that you don’t want to commit, or temporarily testing a patch.
I think this could be made more prominent, and indeed made clear at the top of the section that [patch]
can appear in either Cargo.toml
or config.toml
. I've referred to this documentation many times without noticing this tiny note revealing this important option!
Also, worth noting that the advantage of using config.toml
over a CLI option is that IDEs and other tooling would also be able to pick up on the local-only patches, whereas a CLI option would not allow this.
Steps
No response
Possible Solution(s)
I think the option of using config.toml
for [patch]
should absolutely be mentioned at the very top of "The [patch]
section" documentation!
Notes
No response
Version