| Age | Commit message (Collapse) | Author | Lines |
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
|
|
since they are now built-in to the Cargo binary
|
|
|
|
|
|
|
|
This caught several places which weren't waiting until the command finished to drop the Group.
I also took the liberty of calling `msg_sysroot_tool` from `run_cargo_test` to reduce code duplication and make errors like this less likely in the future.
|
|
This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.
|
|
|
|
refactor `tool_doc!`
resolves https://github.com/rust-lang/rust/pull/112211#discussion_r1215190510
|
|
Signed-off-by: ozkanonur <work@onurozkan.dev>
|
|
In particular, this hides compiletest suites under a dropdown - some builders are configured with `verbose-tests`, which makes the suites take up many thousands of lines.
before:
```
Documenting stage1 cargo (x86_64-unknown-linux-gnu)
Check compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
```
after:
```
::group::Documenting stage1 cargo (x86_64-unknown-linux-gnu)
::group::Testing stage1 compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu)
```
|
|
Don't compile rustc to self-test compiletest
This was changed from stage 0 to 1 in https://github.com/rust-lang/rust/pull/108905, but I'm not sure why. Change it to `top_stage` instead to allow people to choose the stage.
This should save quite a bit of time in the `mingw-check` builder, which explicitly runs `x test --stage 0 compiletest`.
Note that this also fixes a latent bug that depended on running `x build compiler` before `x doc compiler`, as well as a couple cleanups related to symlinks (which made the latent bug easier to find).
cc `@pietroalbini`
|
|
|
|
|
|
this gives a more helpful backtrace if it fails
before:
```
thread 'main' panicked at 'symlink_dir_force(&builder.config, &out, &out_dir) failed with No such file or directory (os error 2)', doc.rs:697:9
```
after:
```
thread 'main' panicked at 'symlink_dir(config, original, link) failed with No such file or directory (os error 2) ("failed to create link from /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/doc -> /home/jyn/src/rust2/build/x86_64-unknown-linux-gnu/compiler-doc")', doc.rs:975:5
```
|
|
this is consistent with std and makes it much easier to understand what's actually happening
|
|
pass `--lib` to `x doc`
This PR want to close #112082
|
|
|
|
This makes it more clear that we're using stage 0 *to document* rustc, not that we're documenting
stage0 rustc itself.
It also fixes a bug in `msg_sysroot_tool` that would print `Docing`, and removes the `Debug` impl
for `Kind` to make sure it doesn't happen again.
Before:
```
Documenting stage0 compiler {rustc-main} (aarch64-apple-darwin)
```
After:
```
Documenting compiler {rustc-main} (stage0 -> stage1, aarch64-apple-darwin)
```
|
|
- Switch from `cargo rustdoc` to `cargo doc`
This allows passing `-p` to multiple packages.
- Remove `OsStr` support
It doesn't work with RUSTDOCFLAGS, and we don't support non-utf8 paths
anyway.
- Pass `-p std` for each crate in the standard library
By default cargo only documents the top-level crate, which is
`sysroot` and has no docs.
|
|
Previously they were using `all_krates` and various hacks to determine
which crates to document. Switch them to `crate_or_deps` so `ShouldRun`
tells them which crate to document instead of having to guess.
This also makes a few other refactors:
- Remove the now unused `all_krates`; new code should only use
`crate_or_deps`.
- Add tests for documenting Std
- Remove the unnecessary `run_cargo_rustdoc_for` closure so that we only
run cargo once
- Give a more helpful error message when documenting a no_std target
- Use `builder.msg` in the Steps instead of `builder.info`
|
|
This verifies the intra-doc links are correct, and hopefully makes
things easier for new contributors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bootstrap: Get rid of tail_args in stream_cargo
Based on https://github.com/rust-lang/rust/pull/106303 for convenience.
r? ````@Mark-Simulacrum````
|
|
Before:
```
Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
After:
```
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
Note there is a slight consistency between `build` and `test`: The
former doesn't print "compiler artifacts". It would be annoying to fix
and doesn't hurt anything, so I left it be.
```
; x t rustc_interface --stage 0 --dry-run
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
; x b rustc_interface --stage 0 --dry-run
Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
|
|
|
|
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo, but as a nice side effect this makes `x doc cargo` work locally.
|
|
|
|
copy doc output files by format
This pr provides copying doc outputs by checking output format without removing output directory on each trigger.
Resolves #103785
|
|
Signed-off-by: ozkanonur <work@onurozkan.dev>
|
|
This also adds a new `mod download` instead of scattering the download code
across `config.rs` and `native.rs`.
|
|
Signed-off-by: ozkanonur <work@onurozkan.dev>
|
|
|
|
Fix json flag in bootstrap doc
Fix the `--json` flag not working with x.py (Closes #103816)
While this works I'm not sure about the `should_run` of `JsonStd`, had to change it because https://github.com/rust-lang/rust/blob/ab5a2bc7316012ee9b2a4a4f3821673f2677f3d5/src/bootstrap/builder.rs#L334 would match with JsonStd and remove the paths that Std matched. So I did [this](https://github.com/viandoxdev/rust/blob/ffd4078264c4892b5098d6191e0adfe3564d62ca/src/bootstrap/doc.rs#L526-L534) but that looks more like a hack/workaround than anything. I'm guessing there's something to do with the default condition thing but idk how it works
|
|
|
|
|
|
This allows open() to be called from other places in bootstrap (I need
this for Ferrocene), and it simplifies the callers by moving the
"was_invoked_explicitly" check into the function.
|
|
|
|
|
|
|
|
|
|
Enable `x.py check` for miri
Now that the miri subtree is working properly, let's add it to x.py check.
cc `@rust-lang/miri`
|