-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[x.py] Option to not rebuild compiler #46180
Comments
I've often wondered if incremental recompilation fixes this, as no code has changed. |
Have you tried ./x.py test --stage 1 --keep-stage 1 src/libstd
# ^^^^^^^^^^^^^^ |
Without changes:
Then, add one line to libstd's main doc block: > vim .\src\libstd\lib.rs Then with
aka, it still rebuilds. |
I'm pretty sure |
Does |
What's the status of this? |
I don't think this is actionable - either there's a bug in --keep-stage (which I don't think is the case), or it was user error passing --keep-stage 1 instead of --keep-stage 0. I highly recommend reading through https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html to see what the difference is.
See #47389 - the rebuilds are not actually spurious, and once the compiler is rebuilt, all its artifacts have to be rebuilt in order to be sound (see also #76720 which intentionally does not rebuild and thus regularly has ICEs that can be fixed by clearing the build directory). There's a bit more discussion at https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#stages-and-std (I thought there was somewhere that discussed ABIs more thoroughly, but I can't find it now). So I think this should be closed. |
I'm going to close this since it's not actually a bug. I do want to mention that if you're only changing documentation, you can use |
One of the biggest paper cuts when working on Rust documentation is that x.py is really really eager to rebuild the compiler, even when the only thing that is changing one line in documentation or update a test.
As such, it would be extremely beneficial to those writing docs and tests (including doctests!) if we could have a flag where we as the end user of the flag promise we're not changing actual compiler code, so please use the previous still good compiler to rebuild the docs with our changes. Note that the option doesn't have to actually rebuild the documentation, as ideally we'd just combine it with
x.py doc
andx.py test src/libstd
as needed.cc @rust-lang/infra
The text was updated successfully, but these errors were encountered: