fix(dist): fix unexpected downgrades without --allow-downgrade - #5023
Open
rami3l wants to merge 9 commits into
Open
fix(dist): fix unexpected downgrades without --allow-downgrade#5023rami3l wants to merge 9 commits into
--allow-downgrade#5023rami3l wants to merge 9 commits into
Conversation
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
2 times, most recently
from
August 19, 2026 10:14
7518b22 to
d32943e
Compare
rami3l
commented
Aug 19, 2026
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
8 times, most recently
from
August 19, 2026 17:16
e98f0b6 to
7bd3251
Compare
rami3l
marked this pull request as ready for review
August 19, 2026 17:23
rami3l
commented
Aug 19, 2026
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
from
August 25, 2026 22:01
eb59f3f to
0b5207e
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
from
August 26, 2026 10:03
0b5207e to
8d875d4
Compare
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
from
August 26, 2026 10:07
8d875d4 to
6fddede
Compare
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.
Closes #5003.
Normally, when a toolchain is updated, the manifest date of the toolchain to be installed is compared to the current manifest date, so that
--allow-downgradecan reject or allow potential downgrades accordingly.However, there is a bug in the existing logic in that the comparison is performed only after the target toolchain is installed, which has effectively blocked all effects of
--allow-downgradeuntil the backtracking1 has started, which is unfortunately never the case except for certainnightlybuilds. This seems to be the root cause of #5003.This PR fixes this issue by comparing the manifest dates before the target toolchain is installed.
Footnotes
Rustup backtracks to older manifests to meet all component requirements. This is necessary because certain nightlies are allowed to not have the complete set of components. ↩