Skip to content

Update rustup.sh to use rustc-josh-sync - #1702

Open
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:josh-sync-script
Open

Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:josh-sync-script

Conversation

@Kobzol

@Kobzol Kobzol commented Sep 16, 2026

Copy link
Copy Markdown
Member

I think that most of the old stuff should be unnecessary now?

Comment thread scripts/rustup.sh
Comment thread scripts/rustup.sh
git merge sync_from_rust -m "Sync from rust $RUST_VERS"
git branch -d sync_from_rust
git checkout -b sync_from_rust
rustc-josh-sync pull

@bjorn3 bjorn3 Sep 16, 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.

I needed GIT_CONFIG_GLOBAL=../rust/josh.gitconfig RUSTC_GIT=../rust too. The GIT_CONFIG_GLOBAL could be removed once rustc-josh-sync has native SSH support.

View changes since the review

Comment thread scripts/rustup.sh
echo "=> Uninstalling all old nightlies"
for nightly in $(rustup toolchain list | grep nightly | grep -v "$TOOLCHAIN" | grep -v nightly-x86_64); do
rustup toolchain uninstall "$nightly"
done

@bjorn3 bjorn3 Sep 16, 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.

Please keep the install new nightly (does rustup toolchain install work to install the toolchain in rust-toolchain.toml?) and uninstall old nightlies code.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In theory, there's a risk of desyncing the nightly version vs what the pull will install (though in practice it should be the same). rustup toolchain install seems to work, maybe we can just run it after a pull?

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.

I would prefer doing it in prepare to also run it if a merge conflict happened. Merge conflicts are the reason pull and prepare are separate steps.

Comment thread scripts/rustup.sh
"commit")
git add rust-toolchain.toml
git commit -m "Rustup to $(rustc -V)"
;;

@bjorn3 bjorn3 Sep 16, 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.

If there is a merge conflict, what state does rustc-josh-sync leave the repo in? Does it pre-populate the commit message and does it stage the rust-toolchain.toml and rust-version changes?

View changes since the review

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.

2 participants