Closed dhardy closed 3 months ago
On a somewhat relevant note: it may be worth to consider moving rand
into its own folder and use virtual manifest for workspace.
MSRV of crates also may evolve differently
I take the view that if it isn't tested, it doesn't work, and we only have one CI test for MSRV. We've been using a common policy across this repo for a while already.
I suspect rand_core
and RNG crates may work with a lower rustc, but don't really care; half our deps now require a higher MSRV anyway (at least if you count dev deps).
It's matter of bumping MSRV in future, e.g. why should MSRV bump for rand_distr
bump MSRV for rand
? Yes, different crate MSRVs would require some CI changes, but it's nothing impossible.
Also, I don't think that this:
edition.workspace = true
rust-version.workspace = true
is cleaner than this:
edition = "2021"
rust-version = "1.61"
Yes, it helps with bumping MSRV/edition, but we do it quite rarely, while user often look into Cargo.toml for information about crate and such indirection only wastes their time.
It's matter of bumping MSRV in future,
It doesn't prevent that.
Also, I don't think that this: ... is cleaner than this:
No. The only advantage is making those values easier to change.
Bevy have a cleaner set-up, but I couldn't find doc on how it works and .workspace = true
was needed in testing...
Either way, this stuff isn't very important.
it also wasn't accurate since rust-version prevents older rust versions from attempting to compile the code-base.
I don't think so, older Rust versions will just ignore rust-version
and print a warning.
I agree makes sense to have the same MSRV for all crates if that is what we are testing. If the MSRVs diverge, it should be reflected by the CI, and we can still change that later.
Workspace inheritance was only stabilised in 1.64 so we can't do that yet.
We should probably still link the upgrade guide?
Done.
I don't think so, older Rust versions will just ignore rust-version and print a warning.
No (at least not since versions which support rust-version
).
$ cargo +1.60 test
error: package `rand_core v0.9.0-alpha.1 (..)` cannot be built because it requires rustc 1.61 or newer, while the currently active rustc version is 1.60.0
rust-version
prevents older rust versions from attempting to compile the code-base.This reduces the MSRV to one place: the top
Cargo.toml
.