Revert "build_tools/check.sh: check that stable rust is up-to-date"

As reported in #11711 and #11712, the update-checks make check.sh automatically
fail every 6 weeks, so it pressures people into updating Rust, and (what's
worse), updating fish's pinned Rust version, even when that's not relevant
to their intent (which is to run `clippy -Dwarnings` and all other checks).

The update-checks were added as a "temporary" solution to make sure that
our pinned version doesn't lag too far behind stable, which gives us an
opportunity to fix new warnings before most contributors see them.

As suggested in #11584, reasonable solutions might be either of:
1. stop pinning stable Rust and rely on beta-nightlies to fix CI failures early
2. use renovatebot or similar to automate Rust updates

Until then, remove the update check to reduce friction.
I'll still run it on my machine.

This reverts commit 6d061daa91.
This commit is contained in:
Johannes Altmanninger
2025-08-10 15:48:33 +02:00
parent 51fd00c98f
commit d93fc5eded

View File

@@ -29,26 +29,14 @@ cleanup () {
trap cleanup EXIT INT TERM HUP
repo_root="$(dirname "$0")/.."
build_dir="${CARGO_TARGET_DIR:-$repo_root/target}/${target_triple}/debug"
if $lint && command -v rustup >/dev/null && rustup show active-toolchain | grep -q ^stable-; then
# Check that stable is up-to-date
if rustup check | grep ^stable- | grep 'Update available'; then
exit 1
fi
# Same in CI.
rust_version=$(rustc --version | cut -d' ' -f2)
rust_version=${rust_version%.*}
grep -q "\bdtolnay/rust-toolchain@$rust_version\b" \
"$repo_root/.github/actions/rust-toolchain@stable/action.yml"
fi
if $lint; then
export RUSTFLAGS="--deny=warnings ${RUSTFLAGS}"
export RUSTDOCFLAGS="--deny=warnings ${RUSTDOCFLAGS}"
fi
repo_root="$(dirname "$0")/.."
build_dir="${CARGO_TARGET_DIR:-$repo_root/target}/${target_triple}/debug"
template_file=$(mktemp)
FISH_GETTEXT_EXTRACTION_FILE=$template_file cargo build --workspace --all-targets
if $lint; then