Hey all, question about specifying patches in Cargo.toml
: I have a library I am trying to release, but I need to patch another dependency library that will eventually be updated, but isn't yet. For now, I am hosting the updated version on my own github, and have specified the Cargo.toml as
[dependencies]
k = { version = "0.29.1" }
[patch.crates-io]
k = {git = "https://github.com/AndrewJSchoen/k" }
However, when I build from scratch (e.g. clone repo and run cargo build
), it uses the unpatched version and fails to build. Have I done something wrong here?
Side note: if I comment out the patch section, build (which obviously fails), then uncomment, it works. Not sure what might be going on there. Seems like it doesn't notice it the first time.