This my be a little confusing but let me try my best to explain the situation using an example
I have a project called A. A is directly dependent on a package called B which is mentioned under A's [dependencies]
B is directly dependent on a package called C. B is also dependent on a package called D which is again directly dependent on C. The structure can be pictured as below.
A --> B
B --> C
B --> D
D --> C
I want to add a fix to C and hence I fork it and push my changes.
I add the patch in A's Cargo.toml as
[patch.crates-io]
C = { git = "https://github.com/Amulyam24/c.git", rev = "abcdefg" }
The issues I'm seeing:
- This doesn't override C's source in B and D. Will adding the patch in top level Cargo.toml not work?
is the only way to make this work is to also patch C in B and D? - If the version of C is 0.1.0 in B and D, what version will my patch be considered as? <0.2.0 or >=0.2.0