-
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
Allow [replace] overrides to track versions of a replacement #2977
Comments
cc @wycats, an interesting use case that doesn't quite match what @aidanhs how come though |
It's both onerous and prone to human error - someone adds another crate depending on a different version of foo? Hope you remembered to add a replace line! Just to add a concrete example of where this would be useful, see sfackler/rust-openssl#434. Not wanting to be on the hook for rushing out openssl releases is perfectly reasonable, but I'm willing to tolerate being a bit behind in my own projects. In general there are plenty of cases where an idea doesn't align with the intentions of the upstream crate but it's easy to maintain a fork. Thinking about the unresolved question (bugfixes to tracked crates), I wonder if we could abuse prerelease notation - a |
Note that for cases like native libraries this is what overriding build scripts was intended for, where you'd have your own precompiled version of OpenSSL for musl. |
I have some thoughts on improvements to make that more useful which I'll think about, but it can't help if you don't have the library built (so you want to build it from scratch within a build script, like libz and libssh2, or distribute the openssl .a files). |
Right yes the purpose is to override with precompiled artifacts, not part of the normal build process (hence the |
I believe this has been "effectively added" in the sense that we've since added |
This issue title is subideal, so I'll give an example.
Crate foo is 1.0.0. They don't really want to add a 5k loc build script to support people using a specific 15 year old version of solaris. Acme corp use this version of solaris and would really like to use crate foo. They would like to create a fork of foo and use it in their projects, and they'll handle tracking foo upstream and bumping acmefoo. The replacement line might look something like
"foo" = { track = "acmefoo" }
- any version of foo in the dependency tree will be swapped out for acmefoo.Ecosystem divergence is prevented by making sure the upstream crate is always the source of truth of version numbers
replace
- version numbers are taken from crates.io for fooUnresolved question: what happens if acmefoo ends up with a bug in their crate? How do they release a fix? Maybe this should remain an unresolved question to try and encourage these tracked replacements to be very thin.
This is not the same as #2649
The text was updated successfully, but these errors were encountered: