-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cargo run
doesn't rebuild bootstrap binaries
#95141
Comments
@rustbot claim |
Coming from #94828, does the solution to this involve leveraging artifact dependencies somehow? I'd be very impressed if that worked. |
No, artifact dependencies are still unstable, so bootstrap can't use them yet. |
(of course, if anyone is interested in stabilizing artifact dependencies, this would still be a fun experiment to try out ...) |
Ah, I was hopeful that something like this could help to exercise artifact dependencies to get them to stable sooner. :) Is the problem that artifact dependencies are unstable, or is the problem just that bootstrap is using a version of Rust that doesn't contain support for them? I'm not generally aware of unstable features being forbidden in the compiler. |
Not in the compiler, but in bootstrap itself: #92260 (comment) |
I am planning to add a shim binary that should make this unnecessary (see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/bootstrap.20user.20survey/near/283897117). The shim will use a pre-downloaded bootstrap from CI, which makes the approach here unnecessary. Until I implement downloadable bootstrap, I'll just live with the broken caching locally. |
Currently,
cargo run
has a big footgun: if you modifysrc/bootstrap/bin/rustc.rs
(or rustdoc.rs), it won't be rebuilt until you manually runcargo build --bins
. I tried avoiding this in #94828 by running that automatically in bootstrap, but it discards various linker arguments and environment variables that prevent people from configuring the build.A better solution is to introduce a binary that dispatches to different main functions, like rustup. If called as
bootstrap
it would run the main builder; if called asrustc
orrustdoc
it would run the logic currently inrustc.rs
/rustdoc.rs
; if called by any other name it should give a hard error.cc #94828 (comment), #94829
I am happy to help mentor this work.
@rustbot label: +A-rustbuild +C-enhancement +E-mentor +E-help-wanted
The text was updated successfully, but these errors were encountered: