You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker RUST_VERSION can drift from rust-toolchain.toml silently #371
with a comment saying # Keep in step with rust-toolchain.toml. The RUSTUP_TOOLCHAIN line is there deliberately, to stop rustup fetching the
components rust-toolchain.toml asks for.
The cost is that the two can drift silently. Bump rust-toolchain.toml and
the Docker build keeps using the old compiler, with nothing failing — local
builds and shipped binaries are simply built by different versions, and the
difference shows up as a bug that reproduces in one place and not the other.
A comment is the weakest possible enforcement for an invariant that has to
hold across two files.
Options, in rough order of preference:
Read the version from rust-toolchain.toml in the build, so there is
one source of truth.
Assert it: a CI step that parses both and fails when they differ.
Cheap, and it turns a silent drift into a red check.
Leave the comment and accept the risk, which is what we have now.
Activity