-
Notifications
You must be signed in to change notification settings - Fork 9
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
Patches do not apply before cargo update
#61
Comments
Can you give me more information about your setup like a minimal |
Sure, Consider the following patch to aperture, which adds feature flags to it
We use this patched aperture in our own crate as
At this point, invoking cargo update will fail due to being unable to satisfy the dependecy aperture, with the feature flags we want to add via the patch. |
Hm... ok that is strange and at the moment I cannot really see the problem. This should work without any problems. Just two more things to make sure those are not the problem. I assume you did setup the patching using something like this in your [package.metadata.patch.aperture]
version = "0.3.2"
patches = [
"<path-to-aperture-patch-file>"
] Afterwards you ran [patch.crates-io]
aperture = { path = './target/patch/aperture-0.3.2' } |
|
Good to know that you are using build.rs. But even though you do you still need those two entries. If you did setup your patching according to the documentation then the build.rs only calls the patch binary. The binary needs those two entries in the Cargo.toml otherwise it does not not where the patch is and it will not replace the dependency with the patched one. Therefore please check whether the |
I am adding feature flags to dependencies that my package depends on. These features are enabled/disabled depending on the features exposed by my package itself.
However, on cargo update, the dependencies fail to resolve, since the dependency itself doesn't expose said feature flags.
Not sure what should be the ideal flow here.
The text was updated successfully, but these errors were encountered: