fix(dist): fix unexpected downgrades without --allow-downgrade - #5023
Open
rami3l wants to merge 8 commits into
Open
fix(dist): fix unexpected downgrades without --allow-downgrade#5023rami3l wants to merge 8 commits into
--allow-downgrade#5023rami3l wants to merge 8 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
4 times, most recently
from
August 19, 2026 16:11
45026fa to
2f746ae
Compare
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
3 times, most recently
from
August 19, 2026 17:07
e1c820f to
c6c7e48
Compare
rami3l
force-pushed
the
fix/upgrade-false-positive
branch
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
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. ↩