-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to force using a version via [patch] #584
Comments
The wording is confusing, but it means that you can patch one or more of the crates that depend on a crate to relax/refine the version constraint without making any changes to the code itself. |
Let's suppose I have the following dependency chain:
And in this scenario, I want to use a different version of C. So I could patch B, right? For someone who's never done this before, this means forking B and editing its |
Yes. |
Perfect, thank you! |
This fixes 2 bugs that were originally opened on this repo but really belong to the crate used to create crate graphs: - EmbarkStudios/krates#60 - EmbarkStudios/krates#64 Resolves: #584
Is your feature request related to a problem? Please describe.
Following the cargo-deny book, I'm trying to set up this use case:
I want to do a simple version override where the new version already published on crates.io. For example, this is just one line in NPM.
But I can't find any info in the Cargo book or elsewhere about how to do this.
Describe the solution you'd like
It would be nice if this part of the cargo-deny book linked to a how-to article or had a Cargo.toml example.
If the only options are changing the "version dependency" to a "Git dependency", or forking the package causing the dependency, that might be nice to explain.
Describe alternatives you've considered
I tried this
[patch]
section......but it gives this error:
Additional context
Presumably related open Cargo issues:
The text was updated successfully, but these errors were encountered: