ci: disable cache-bin in setup-rust-toolchain#557
Merged
Conversation
Avoid restoring a stale rustup proxy binary from cache over the freshly installed one. The new Homebrew rustup formula ships a wrapper that drops argv[0], breaking cargo/rustc multiplex dispatch; once a poisoned ~/.cargo/bin/ lands in the GHA cache it re-poisons every later run on that key. We don't cargo-install any tools, so the cache is pure risk. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
adamspofford-dfinity
approved these changes
May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cache-bin: falseto everyactions-rust-lang/setup-rust-toolchaininvocation acrosschecks.yml,test.yml, andvalidate-examples.yml(8 sites).~/.cargo/bin/from round-tripping through the GitHub Actions cache, which was poisoning macOS runs.Background
A Homebrew rustup formula change on 2026-05-06 (cfffe64f) replaced the multiplexed
rustup-initbinary with anenv_script_all_fileswrapper. The wrapper exec's the real binary by filename, droppingargv[0], which breaks rustup's name-based proxy dispatch —cargo testbecomesrustup-init testand fails witherror: unexpected argument 'test' found. The new macOS runner image20260511.0048baked that bottle in, surfacing on jobs that draw the new image.setup-rust-toolchaincaches~/.cargo/bin/, so once a single run on the broken image saved its~/.cargo/bin/into a cache key, every later run hitting that key restored the broken proxy on top of its freshly-installed one. Manually evicting the cache unblocks a job; this change prevents re-poisoning.This repo doesn't run
cargo installanywhere (wasm-toolsis installed viataiki-e/install-action, which downloads prebuilt binaries), so the cache had no upside to weigh against this risk.Related: actions/runner-images #14099, #14097; Swatinem/rust-cache#341.
Test plan
~/.cargo/bin/is built and not cached)🤖 Generated with Claude Code