2 ms·
> Instead of trying to get the latest version it's going to try to get the oldest. Err, no. For each library it uses the newest version of the library that is
by IshKebab 9y ago
> Instead of trying to get the latest version it's going to try to get the oldest.
Err, no. For each library it uses the newest version of the library that is used by any of its dependents (including transitive dependents).
See https://research.swtch.com/vgo-mvs https://research.swtch.com/vgo-mvs
Especially the line: Simplify the rough build list to produce the final build list, by keeping only the newest version of any listed module.
Different major versions are considered different libraries essentially.
To be honest I thought this was all obvious and I'm sure this approach has been recommended by Go people in the past.
It has another nice advantage over Rust's system - you have have pre-releases of major versions. Rust doesn't really have a way to do that except for releases before version 1.0.
In other words when you want to do some incompatible changes and release version 2 of your library there's no good way to put test versions of it on Crates.io.
- steveklabnik 9y ago> It has another nice advantage over Rust's system - you have have pre-releases of major versions. Rust doesn't really have a way to do that except for releases before version 1.0. Semver has a specific way to indicate that a feature is a pre-release, and people use it. The second post on /r/rust is advertising a pre-release of the next major version of rand: https://crates.io/crates/rand/0.5.0-pre.0 https://crates.io/crates/rand/0.5.0-pre.0 (Yes, this is before 1.0, but 1.5.0-pre.0 would work just fine too!)
- IshKebab 9y agoDo you have a reference for that? It isn't mentioned here: https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field https://doc.rust-lang.org/cargo/reference/manifest.html#the-... I found this bug report and it seems like it has some issues: https://github.com/rust-lang/cargo/issues/2222 https://github.com/rust-lang/cargo/issues/2222
- steveklabnik 9y agoReference: I maintain the semver library. I’m on my phone, so I can’t link you to the docs right now. I’ll add a link tomorrow.
- steveklabnik 9y agoSo, looking back, we don't explicitly say that we have these things, we just say that we use semver versions, and the semver spec specifies them. I've been meaning to re-vamp the cargo docs, maybe this is worth explicitly calling out. Thanks!
- IshKebab 9y agoAh cool, sorry I wouldn't have asked for a reference if I'd noticed your username!
- steveklabnik 9y agoIt's all good! <3