-
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
rustbuild rebuilds too much on modifications to rustdoc #38318
Comments
Yes rustbuild builds rustdoc in all three stages as opposed to just the end (which the makefiles did). We may be able to get away with only detecting/cleaning between stages if An alternative would be to work with |
Would #38331 help with this? In theory you could then |
It seems that
Confusingly, before I decided to systematically dive into this, these combinations would also use old builds of rustdoc for its documentation rendering, or would generate dynamic-link errors by trying to reference .so files from earlier stages but using hashes from later on. I would dive further into this, but my development environment is a tiny server that takes 15 minutes to rebuild a stage, so I'll leave the report at this for now. For the moment it seems like I need to build all of std and rustc, at least once, just to test a rustdoc change. |
Compile rustdoc on-demand Fixes #43284, fixes #38318, and fixes #39505. Doesn't directly help with #42686, since we need to rebuild just as much. In fact, this hurts it, since `./x.py doc --stage 0` will now fail. I'm not sure if it did before, but with these changes it runs into the problem where we attempt to use artifacts from bootstrap rustc with a non-bootstrap rustdoc, running into version conflicts. I believe this is solvable, but leaving for a future PR. This means that rustdoc will no longer be compiled when compiling rustc, by default. However, it is still built from `./x.py build` (for hosts, but not targets, since we don't produce compiler toolchains for them) and will be built for doc tests and crate tests. After this, the recommended workflow if you want a rustdoc is: `./x.py build --stage 1 src/tools/rustdoc` which will give you a working rustdoc in `build/triple/stage1/bin/rustdoc`. Note that you can add `src/libstd` onto the command to compile libstd as well so that the rustdoc can easily compile crates in the wild. `./x.py doc --stage 1 src/libstd` will document `libstd` with a freshly built rustdoc (if necessary), and will not rebuild rustc on modifications to rustdoc. r? @alexcrichton
Modifying just rustdoc and rebuilding with the Makefiles by running
make doc
results in the following:Which doesn't take long. However with rustbuild
python x.py doc --stage 1
results in:Is there a faster way to rebuild rustdoc and the docs when using rustbuild?
The text was updated successfully, but these errors were encountered: