-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add download-only flag to bootstrap for early exit #98464
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add download-only flag to bootstrap for early exit #98464
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
I am not sure we should have a dedicated flag for this; we already have a number of downloads (e.g., submodule updates after #97513, IIRC LLVM toolchains today) that are separate from bootstrap.py, and some of those are even dynamic. I am concerned that this flag will end up needing to get threaded around all over the place and bail outs added. CI today has a special cased For distros and others building offline, I believe my current understanding and expectation is that most folks are bootstrapping from a locally installed toolchain (i.e., config.toml rustc=, cargo= configured) and the rust-src tarball. That combination essentially ensures that we build reasonably offline, and doesn't need special flags passed to do so (for the most part, anyway). |
cc @jyn514 |
Oh, I didn't realize |
That seems plausible (it just runs a normal x.py build with a dummy step, IIRC); expanding it to download other things could make sense. I'm not sure how much duplication or awkward plumbing that will require (e.g., I believe we avoid downloading LLVM until we need it, and not all users of make prepare will). |
@Mark-Simulacrum it should be fairly simple to add a function that downloads everything I think (just calling functions it know it will do downloads if necessary, like Line 678 in 00ce472
|
I'm not a fan of having to maintain a list of "all downloads", particularly since I'm not sure that's a well-defined list. For example, should it include the git repositories cloned by cargotest? Should it include random URLs visited by linkcheck? Obviously there's a boundary we can draw here, but I think before we invest I'd like to have someone who is actively interested in using this say more about their use case -- if the existing logic is enough for them or the rust-src tarball + custom-sourced rustc/cargo tarballs are enough, then I'm inclined to do nothing further. |
@smijolovic can you try out |
Another thing we can do is to add an I don't think we're going to land this PR as-is, though. |
Resolves #83455.
Adds the --download-only to bootstrap.py so it can be run as follows:
./x.py --download-only
which allows the downloads to happen independently of other commands.