Repository navigation
docs(user-guide): Clarify that channels are not automatically updated #5259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,9 +8,11 @@ on Rust's train release model. The release schedule is posted to the [Rust | |
| 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 | ||
| installed version to the latest release on that channel. See the [Keeping rust | ||
| up to date] section for more information. | ||
| When installing from a channel, `rustup` installs the latest release from that | ||
| channel at that point of time. Once installed, `rustup` does not automatically | ||
| 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. | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the presence of However, To keep your teams CI in sync, all you need to do is run
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It might rather be conceivable that similar to how for 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
Except this is not guaranteed? You only make sure that this way CI always uses the latest release. But
To clarify, I am not saying that fixing such issues is necessarily difficult or much work; maybe just running And for users who are looking into For example searching for And especially with Dependabot and Renovate supporting Footnotes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my personal experience, if you are looking at using The nightly case has some clear exceptions e.g. for running nightly |
||
| `rustup` can also install specific versions of Rust, such as `1.45.2` or | ||
| `nightly-2020-07-27`. See the [Toolchains] chapter for more information on | ||
|
|
@@ -19,7 +21,7 @@ details on switching between toolchains and pinning your project to a specific | |
| toolchain. | ||
|
|
||
| [channels]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html | ||
| [Keeping rust up to date]: ../basics.md#keeping-rust-up-to-date | ||
| [Keeping Rust up to date]: ../basics.md#keeping-rust-up-to-date | ||
| [rust forge]: https://forge.rust-lang.org/ | ||
| [toolchains]: toolchains.md | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,7 +128,24 @@ string in the following form: | |
| <date> = YYYY-MM-DD | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > When specifying unversioned channels such as `stable` (instead of `1.99.1`) | ||
| > or `nightly` (instead of `nightly-2021-01-21`) and that channel is already | ||
| > installed locally, `rustup` will use that existing installed release, even | ||
| > if a newer release for that channel might be available online. | ||
| > | ||
| > 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"`]. | ||
|
Comment on lines
+137
to
+143
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| [toolchain]: concepts/toolchains.md | ||
| [Editions]: https://doc.rust-lang.org/edition-guide/editions/ | ||
| [Cargo `rust-version`]: https://doc.rust-lang.org/cargo/reference/rust-version.html | ||
| [`build.warnings = "deny"`]: https://doc.rust-lang.org/cargo/reference/config.html#buildwarnings | ||
|
|
||
| #### path | ||
|
|
||
|
|
||
There was a problem hiding this comment.
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
rustuptorustup updateis enough for clarification.There was a problem hiding this comment.
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 updatemanually if they want to update the channel.Otherwise even when replacing
rustupwithrustup updatehere, there might still be uncertainty. For example a user could assume an automatic update check happens every X weeks, butrustup updateforces an update check.Similar to how
rustupself-update works, whererustup self updateforces an update check.