-
Notifications
You must be signed in to change notification settings - Fork 76
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
Refactor scripts to set up Rust on dev desktops #132
Conversation
I missed that the worktree scripts are calling |
The |
@@ -13,4 +13,4 @@ git checkout upstream/master | |||
ln -s ../config.toml |
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.
this seems somewhat confusing, usually I want different config files in different worktrees. but if no one has complained so far it's probably fine
@jdno have you seen #132 (comment) ? |
@jyn514 I've updated the |
Looks great, thanks! My last comment is that rust-lang/rust#103286 is landing soon - we may want to either wait until it lands so we can use the new sysroot names unconditionally, or use version detection so this doesn't silently break. |
Thanks for the heads-up, @jyn514! What's the best way to detect the version? Can we somehow check the bootstrap version, or should we just go for |
@jdno try this:
I can add a comment to bootstrap saying to keep the version in the same file. Major version 3 is the one that's going to change the sysroot paths; there's not yet a way to test it unless you want to run your script against a checkout of rust-lang/rust#103286. Looking at the compiler version won't help because it just show |
The scripts to set up Rust for a user on the dev desktops have been refactored for a better onboarding experience and error handling. The init script installs rustup now, and can be extended in the future to also set the user's git username and email. For users who want to set up their own Rust toolchain, the setup_rust script clones their fork of the rust-lang/rust repository, compiles it, and links the build artifacts. This is optional, however, and not required if users want to use the dev desktop to work with different repositories.
A new script has been created to link the build artifacts. The script is called from the init script that sets up Rust, and from the script that initializes a new worktree.
The dev desktops are deployed to machines with different architectures (amd64 and arm64), which makes it necessary to discover the target triple when linking the stages. The current solution was chosen based on the following Stack Overflow post: https://stackoverflow.com/questions/52996949/how-can-i-find-the-current-rust-compilers-default-llvm-target-triple
The directory names for the stages are changing in version 3 of the boostrapping (see rust-lang/rust#103286). We are checking the version now to create the correct dummy directories.
aefbcf5
to
9287abf
Compare
I've added the |
Co-authored-by: Joshua Nelson <[email protected]>
Thanks so much for the help, @jyn514! <3 |
The scripts to set up Rust for a user on the dev desktops have been refactored for a better onboarding experience and error handling. The init script installs rustup now, and can be extended in the future to also set the user's git username and email.
For users who want to set up their own Rust toolchain, the setup_rust script clones their fork of the rust-lang/rust repository, compiles it, and links the build artifacts. This is optional, however, and not required if users want to use the dev desktop to work with different repositories.