-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot [replace] sub-dependency (package version not found, various other problems) #3263
Comments
This is on recent nightly. |
I think what's happening here is that overrides require the version of the override to match the version of what's being overridden, but that's not happening here? |
I confirm the last case of this issue. Edit: I confirm that version |
@antoyo could you clarify what you mean by "last cast" and perhaps provide a link to your setup as well? |
I mean that the dependency is not replaced and I get no warning or error. |
@antoyo ah sorry there may be a few things in flight, could you describe the expected, actual, and difference in behaviors? |
The old behavior was that the dependency gets replaced. |
Thanks, that actually fixed my issue. |
I debugged a bit in the cargo source code, and it occurs to me I misunderstood to what extent The docs say
but my intention is to compile rust-ffmpeg-sys 3.x instead of the transitive dependency 2.8.x. cargo reads my specified git repo as override, but requires is to be of the same version (in my example script: 2.8.8). @alexcrichton Would that use case ever be possible with |
@AndiDog replacing with an entirely new major version tends to not be possible with either |
Close as wontfix then? I'll basically have to use path overrides, and/or simply maintain my own local fork of the projects to use updated dependencies. |
Ah yeah, in that case this is basically wontfix. If you have any more trouble though just let me know! |
This relates directly to #3191. I'm having a similar use case with ffmpeg: since I want to use a newer FFmpeg library (3.x) than rust-ffmpeg currently depends on (
2.8
), I must replace that dependency by rust-ffmpeg-sys 3.x or master. Ideally, I'd just clone both repositories as submodule at the desired commits, and use[dependencies.ffmpeg] path = submodules/rust-ffmpeg
and[replace] "rust-ffmpeg-sys:..." { path = submodules/rust-ffmpeg-sys }
.Unfortunately all my attempts failed 😢. But the good news is that I have a script for you to reproduce:
I see the following problems from the error messages:
>=
to work, as attempt to find the actual version to replaceThe text was updated successfully, but these errors were encountered: