Skip to content

docs(user-guide): Clarify that channels are not automatically updated - #5259

Open
Marcono1234 wants to merge 1 commit into
rust-lang:mainfrom
Marcono1234:doc-channel-updates
Open

Marcono1234 wants to merge 1 commit into
rust-lang:mainfrom
Marcono1234:doc-channel-updates

Conversation

@Marcono1234

Copy link
Copy Markdown
Contributor

This PR tries to make it clearer that once a channel such as stable or nightly has been installed, rustup will not automatically update it. Especially in the context of rust-toolchain.toml this can be undesired in some use cases.

See also my discussion Is rust-toolchain.toml with non-versioned channel such as stable a code smell? on the Rust forum.

I tried to keep the tone rather neutral, because multiple users mentioned in the forum discussion that specifying unversioned stable or nightly in rust-toolchain.toml can be desired.

Please let me know if you want anything changed, have suggestions for better wording, or also if you don't think this is needed or is not helpful.

@Marcono1234
Marcono1234 marked this pull request as ready for review November 24, 2026 17:35
@rustbot

rustbot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Welcome, and thank you for contributing to rustup! A reviewer will take a look at your PR, typically within a week or two.

Please see the contribution instructions and our LLM policy for more information.

@json420 json420 left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is (yet) an improvement.

View changes since this review

Forge]. `rustup` assists with installing different channels, keeping them
up-to-date, and easily switching between them.

After a release channel has been installed, `rustup` can be used to update the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe just changing rustup to rustup update is enough for clarification.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think it would be useful to explicitly mention that channels are not updated automatically, and that the user has to run rustup update manually if they want to update the channel.

Otherwise even when replacing rustup with rustup update here, there might still be uncertainty. For example a user could assume an automatic update check happens every X weeks, but rustup update forces an update check.
Similar to how rustup self-update works, where rustup self update forces an update check.

update the channel when new releases become available. Instead,
`rustup update` can be used to update to the latest release of that channel,
see the [Keeping Rust up to date] section for more information.

@json420 json420 Nov 24, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the presence of rustup on your filesystem does not mean there is some process in the background constantly checking for updates and automatically installing them when available. But this isn't desirable behavior or what (I think) most developers would expect anyway.

However, rustup update does exactly what (I believe) you are wanting. If you rustup toolchain install stable when Rust 1.100 is the stable release, and then run rustup update when 1.101 is released, you will get 1.101.

To keep your teams CI in sync, all you need to do is run rustup update prior to the build and you will all be on the same build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not mean there is some process in the background constantly checking for updates and automatically installing them when available

It might rather be conceivable that similar to how for rust-toolchain.toml it already automatically installs a missing toolchain when invoking cargo ..., it might also perform an update check.
Either way I am not asking for that behavior here in this PR.

My main point is that the user should not have to guess what it means to "install stable / nightly"; the documentation should clearly state that it installs the latest version at that point of time, and then afterwards the user is responsible for updating it manually (through rustup update).


To keep your teams CI in sync, all you need to do is run rustup update prior to the build and you will all be on the same build.

Except this is not guaranteed? You only make sure that this way CI always uses the latest release. But

  • locally on your developer machine you might by accident still run on an older version
  • now CI might break when rebuilding the same commit, just because a new Rust version was released in the meantime1
  • you have now split toolchain configuration into at least 2 places: the rust-toolchain.toml and the CI workflow2

To clarify, I am not saying that fixing such issues is necessarily difficult or much work; maybe just running rustup update locally on your development machine is enough to solve it.
But it is a disruption nonetheless.

And for users who are looking into rust-toolchain.toml to pin to a certain Rust version (which the documentation explicitly mentions as one use case), I think the documentation should point out that channel = "stable" is in fact not actually pinning to a specific version but rather to whatever version CI has pre-installed / cached (if any).3

For example searching for channel = "stable" on GitHub shows multiple cases where a comment says "pin for local and CI", "pinned to stable so versions don't drift", "current stable", "latest stable", and none of this is guaranteed by rust-toolchain.toml itself. Either the comment is just wrong (?) or there is additional setup needed (both locally and for CI) such as rustup update you mentioned.

And especially with Dependabot and Renovate supporting rust-toolchain.toml, it is not that inconvenient anymore to specify an exact version instead of stable.

Footnotes

  1. As mentioned in the doc changes, this might not be a problem in many setups, but it can be for nightly or for build.warnings = "deny". ↩

  2. Or in the worst case into "all CI workflows", because they all need to run rustup update now before they can start. ↩

  3. For example just compare the images on https://github.com/actions/runner-images (as of writing): macos-15: Rust 1.98.0, macos-15-arm64: Rust 1.100.0, xcode-27-arm64: Rust 1.99.1. I am not blaming GitHub here; my point is that relying on the pre-installed stable can make make troubleshooting quite cumbersome. ↩

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my personal experience, if you are looking at using stable then you probably should not put the channel at all (so that beta can be used at the same time, actually this is encouraged by the toolchain teams IIRC)... and when using nightly you almost certainly want to put a particular nightly because nothing on nightly is stable enough for you to pin on "any nightly".

The nightly case has some clear exceptions e.g. for running nightly rustfmt or miri, but I think that'll just be ergonomics improvement and could be covered by something like #4636.

Comment on lines +137 to +143
> When collaborating with other people on a project or when running Continuous
> Integration on a separate machine this can lead to different Rust versions
> being used. This is usually not a problem though due to Rust's stability
> guarnatees (and its features such as [Editions] and [Cargo `rust-version`]).\
> However, there are cases where mismatches between Rust versions can lead to
> unexpected build failures, for example when using nightly features or when
> running Continuous Integration with [`build.warnings = "deny"`].

@rami3l rami3l Nov 25, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we are at it, I'd advise against particularly locking unversioned channels in rust-toolchain.toml... Would that make sense?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I also think specifying an unversioned channel is problematic (though my Rust usage is limited mainly to public library development, so it might not apply to all use cases), but in the above mentioned forum discussion some users did not consider unversioned channels a problem for their use case.

That is why I tried to keep this here rather neutral (and only mention the cases where it is more likely a problem, nightly and build.warnings = "deny").

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants