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

Ensure correct toolchain per clone. #6054

Merged
merged 4 commits into from Jun 29, 2018

Conversation

Projects
None yet
3 participants
@jsirois
Copy link
Member

jsirois commented Jun 29, 2018

Previously, if the Rust toolchain was changed, re-bootstrapping would
proceed correctly in the first clone encountering the change but it
would fail in other clones. Ensure the correct toolchain is set when
building the symlink farm (but not needing to bootstrap the toolchain)
to cover this case.

@jsirois jsirois requested a review from illicitonion Jun 29, 2018

@stuhood
Copy link
Member

stuhood left a comment

Thank you!

jsirois added some commits Jun 29, 2018

Ensure correct toolchain per clone.
Previously, if the Rust toolchain was changed, re-bootstrapping would
proceed correctly in the first clone encountering the change but it
would fail in other clones. Ensure the correct toolchain is set when
building the symlink farm (but not needing to bootstrap the toolchain)
to cover this case.
Further robustify the case where rustup is bootstrapped but other por…
…tions of the toolchain are not or are corrupt.

@jsirois jsirois force-pushed the jsirois:rust_toolchain/fix_multi_clone_use_case branch from 3c6071d to 8caa0f7 Jun 29, 2018

@jsirois

This comment has been minimized.

Copy link
Member

jsirois commented Jun 29, 2018

Went a bit further here and did it really right. Probably worth another look.

function set_rust_toolchain() {
(
cd "${REPO_ROOT}"
"${RUSTUP}" override set "${RUST_TOOLCHAIN}" >&2

This comment has been minimized.

@stuhood

stuhood Jun 29, 2018

Member

Would it be more explicit to use the rust-toolchain file: https://github.com/rust-lang-nursery/rustup.rs#the-toolchain-file ?

This comment has been minimized.

@jsirois

jsirois Jun 29, 2018

Member

I think so. Good idea.

Use rust-toolchain.
This seals the current repo Rust toolchain version in a standard discoverable place. Also rename `bootstrap_rust.sh`'s exported function
to reflect what it actually now does.
@stuhood
Copy link
Member

stuhood left a comment

Excellent!

Fixup PythonBinaryIntegrationTest.
This apparently needs to re-bootstrap the native engine binary and
supporting changes to test infra were needed to ensure the new
rust-toolchain file was available in the test buildroot as result.
@baroquebobcat
Copy link
Contributor

baroquebobcat left a comment

This looks like it'll be very cool. Thanks!

@jsirois jsirois merged commit 2870ed4 into pantsbuild:master Jun 29, 2018

@jsirois jsirois deleted the jsirois:rust_toolchain/fix_multi_clone_use_case branch Jun 29, 2018

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