mirror of
https://github.com/tobi/disktree.git
synced 2026-11-28 08:00:53 +00:00
build: pin the toolchain so a fresh clone can't fail on a stale default
`cargo xtask bundle` from a fresh clone failed with `rustc 1.94.0 is not supported by the following package: xtask@0.10.1 requires rustc 1.97` when the machine's `rustup default` was older than the workspace MSRV. The message blames xtask only because `.cargo/config.toml` aliases `cargo xtask` to `cargo run -p xtask`, so it is the first package in the build graph; cargo rejects the whole workspace before anything compiles. CI pins 1.97 but nothing provisioned it for builders. rust-toolchain.toml pins the same version, with the clippy and rustfmt that `make lint` needs, so rustup fetches it on the first build and local lints match the gate. Verified from this commit: `cargo xtask --help` (the command that failed) runs, `cargo xtask lint` is green, and `cargo xtask bundle` produces target/bundle/disktree-0.10.1-aarch64-macos.zip.
This commit is contained in:
@@ -42,7 +42,9 @@ removes exactly what was installed.
|
||||
|
||||
You need Rust 1.97 or newer and a Wayland or X11 session with a GPU that GPUI
|
||||
can drive (Vulkan). Distributions often package an older Rust;
|
||||
[rustup](https://rustup.rs) installs a current one.
|
||||
[rustup](https://rustup.rs) installs a current one. The repo pins 1.97 in
|
||||
`rust-toolchain.toml`, so with rustup the right toolchain is fetched on the
|
||||
first build even if `rustup default` points at something older.
|
||||
|
||||
### macOS
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# The workspace's MSRV, pinned so rustup provisions it automatically: a fresh
|
||||
# clone builds on a machine whose default stable is older, instead of failing
|
||||
# with cargo's `rustc ... is not supported` before anything compiles. CI pins
|
||||
# the same version (see .github/workflows), and `make lint` needs clippy and
|
||||
# rustfmt, so they come with it.
|
||||
[toolchain]
|
||||
channel = "1.97"
|
||||
components = ["clippy", "rustfmt"]
|
||||
Reference in New Issue
Block a user