In https://hg.mozilla.org/mozilla-central / https://github.com/mozilla/gecko, we have a global workspace, with a few members. Then we have different kinds of builds that may of may not build the entire set of members.
One of those builds only builds
toolkit/crashreporter/rust, and the only dependency that crash has is rustc-demangle, which has no dependency.
And while it’s not visible when building with a recent version of cargo/rust, I somehow tried to build with an older version (1.27), which was what we claimed to be the minimum supported. And it turns out, because cargo apparently reads every Cargo.toml in the workspace, it fails because some unrelated crates have an edition set in their Cargo.toml, and that was still unstable in 1.27.
Steps to reproduce:
- Clone one of the repos mentioned above.
rustup toolchain install 1.27.0
- From the top directory in the clone, run
cargo +1.27.0 rustc --manifest-path toolkit/crashreporter/rust/Cargo.toml --lib.
That fails with:
error: failed to parse manifest at `/home/glandium/gecko/js/src/wasm/cranelift/Cargo.toml` Caused by: editions are unstable Caused by: feature `edition` is required this Cargo does not support nightly features, but if you switch to nightly channel you can add `cargo-features = ["edition"]` to enable this feature
Doing the same with 1.30 instead of 1.27 fails with:
error: failed to parse manifest at `/home/glandium/gecko/media/webrtc/signaling/src/sdp/rsdparsa_capi/Cargo.toml` Caused by: feature `rename-dependency` is required this Cargo does not support nightly features, but if you switch to nightly channel you can add `cargo-features = ["rename-dependency"]` to enable this feature