-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
0.5.0-rc2 break 0.5.0-rc1 #2166
Comments
Thank you for reporting this. Had we named the releases |
I have no idea if this will work but that a nice idea. Also, just to be clear cause I think I mix up a little two issues together, the current code of |
Oh, that's fascinating. I believe what's happened is that |
I suggest something similar to tokio versioning https://crates.io/crates/tokio/0.2.0-alpha.1
Should work no ? (I'm testing with https://crates.io/crates/semver I will update with result) |
Okay so, summary, there is no breaking change concept for prerelease, https://semver.org/#spec-item-11 it's just sorted so there is two solution:
with use semver::{BuildMetadata, Prerelease, Version, VersionReq};
fn main() {
let req = VersionReq::parse("0.5.0-z.0").unwrap();
let a = Version::parse("0.5.0-z.1").unwrap();
let b = Version::parse("0.5.0-y.0").unwrap();
assert!(req.matches(&a));
assert!(!req.matches(&b));
} And yank all previous pre-realease... I afraid such convention would make https://crates.io/crates/rocket/versions appear backward for "major" prerelease version. Also this doesn't solve the final problem that any prerelease version match |
Right, so there's nothing we can do about Cargo updating a dep written as
I'll start with the first point now. |
agree for yank but 1 will not work see: use semver::{BuildMetadata, Prerelease, Version, VersionReq};
fn main() {
let req = VersionReq::parse("0.5.0-rc.1").unwrap();
let a = Version::parse("0.5.0-rc2").unwrap();
assert!(req.matches(&a));
} |
I think the only ok solution is to make the use of use semver::{BuildMetadata, Prerelease, Version, VersionReq};
fn main() {
let req = VersionReq::parse("0.5.0-rc.1").unwrap();
let a = Version::parse("0.5.0-alpha.0").unwrap();
assert!(!req.matches(&a));
} This way the |
Isn't that the same problem but backwards? That is:
So if users write |
yes but that why we should yank never mind we could release a use semver::{BuildMetadata, Prerelease, Version, VersionReq};
fn main() {
let req = VersionReq::parse("0.5.0-rc.1").unwrap();
let a = Version::parse("0.6.0").unwrap();
assert!(!req.matches(&a));
} |
Right, that's the only alternative I see (a I think Cargo's approach makes little sense here and unfortunately, since we didn't specify I'll close this issue while completely agreeing that we've done the wrong thing - I just see no reasonable recourse. On the bright side, rc.2 will see a lot more testing. And as long as |
fine by me |
BTW made a RFC rust-lang/rfcs#3263 I would be interest by any review. |
0.5.0-rc2 make 0.5.0-rc1 not compile:
Thus I fixed it by update my project to rc2 also cargo semver rule consider "0.5.0-rc2" a minor update of "0.5.0-rc1" that quite annoying since it's breaking change https://internals.rust-lang.org/t/changing-cargo-semver-compatibility-for-pre-releases/14820.
Repro
cargo new my_project
:(This issue is more to report this than to require any fix of this problem)
The text was updated successfully, but these errors were encountered: