about summary refs log tree commit diff
path: root/src/bootstrap/doc.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap core implementation to bootstrap/src/core moduleonur-ozkan-1085/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-08-06fix(bootstrap): rename exclude flag to skip 🐛Meysam Azad-1/+1
2023-07-30bootstrap: inline format!() argsMatthias Krüger-3/+3
2023-07-25Remove credential providers from bootstrapArlo Siemsen-9/+0
since they are now built-in to the Cargo binary
2023-07-23Fix test panics for submodule of book is not updatedyukang-4/+14
2023-07-14fix another nesting issuejyn-4/+4
2023-07-14fix another GHA log panicjyn-0/+3
2023-07-14Add must_use to `msg_` functionsjyn-4/+4
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.
2023-07-14Add even more GHA log groupsjyn-0/+9
This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.
2023-07-14bootstrap: update defaults for `compiler` and `library` aliasesLukas Markeffsky-60/+47
2023-06-29Rollup merge of #112234 - ozkanonur:hotfix, r=jyn514Matthias Krüger-9/+41
refactor `tool_doc!` resolves https://github.com/rust-lang/rust/pull/112211#discussion_r1215190510
2023-06-29refactor `tool_doc!` so that it can accept additional arguments.ozkanonur-9/+41
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-06-25Switch some more Steps to `builder.msg`jyn-11/+4
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) ```
2023-06-10Auto merge of #112256 - jyn514:faster-mingw-check, r=Mark-Simulacrumbors-10/+13
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`
2023-06-09Compile rustc_driver by defaultMatthew Esposito-1/+6
2023-06-03fix `x doc --stage 0 compiler` if the compiler hasn't yet been builtjyn-0/+1
2023-06-03don't return a `Result` from symlink_dir_forcejyn-9/+11
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 ```
2023-06-03rename src/dst to original/linkjyn-5/+5
this is consistent with std and makes it much easier to understand what's actually happening
2023-06-02Rollup merge of #112211 - eval-exec:exec/fix-bootstrap-rustdoc, r=ozkanonurMichael Goulet-0/+1
pass `--lib` to `x doc` This PR want to close #112082
2023-06-03Add `--lib` to `cargo doc`Eval EXEC-0/+1
2023-05-31Fix the progress message for `x doc rustc`jyn-1/+1
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) ```
2023-05-29Fix bugs in `doc` refactorjyn-25/+40
- 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.
2023-05-29Switch doc::{Std, Rustc} to `crate_or_deps`jyn-94/+79
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`
2023-05-25Generate docs for bootstrap itselfjyn-1/+4
This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors.
2023-04-25Add a `sysroot` crate to represent the standard library cratesJohn Kåre Alsaker-1/+1
2023-04-10Fix `x check --stage 1` when `download-ci-llvm=false`Joshua Nelson-1/+1
2023-03-27Always set `RUSTC_BOOTSTRAP` with `x doc`clubby789-4/+5
2023-03-10bootstrap: document tidyAlex Huang-0/+1
2023-02-23make --open work on all booksPietro Albini-15/+20
2023-01-26also document hidden itemsPietro Albini-1/+1
2023-01-24add option to include private items in library docsPietro Albini-0/+3
2022-12-30Rollup merge of #106305 - jyn514:tail-args, r=Mark-SimulacrumMichael Goulet-1/+3
bootstrap: Get rid of tail_args in stream_cargo Based on https://github.com/rust-lang/rust/pull/106303 for convenience. r? ````@Mark-Simulacrum````
2022-12-30Use more consistent progress messages in bootstrapJoshua Nelson-1/+3
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) ```
2022-12-29`./x doc library --open` opens `std`Lukas Markeffsky-1/+5
2022-12-22Support documenting CargoJoshua Nelson-11/+52
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.
2022-11-25rustbuild: Don't build doc::SharedAssets when building JSON docs.Nixon Enraght-Moony-1/+3
2022-11-23Rollup merge of #104286 - ozkanonur:fix-doc-bootstrap-recompilation, r=jyn514Dylan DPC-13/+8
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
2022-11-20refactor doc copying processozkanonur-47/+9
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-13Make all download functions need only Config, not BuilderJoshua Nelson-3/+3
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
2022-11-13copy doc output files by format r=ozkanonurozkanonur-13/+46
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-5/+5
2022-11-06Rollup merge of #103851 - viandoxdev:103816_bootstrap_fix_json_doc, r=jyn514Matthias Krüger-51/+32
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
2022-11-05fix out dir being wrong in jsonviandoxdev-1/+5
2022-11-03address review commentPietro Albini-2/+5
2022-11-03move browser opening logic in BuilderPietro Albini-29/+11
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.
2022-11-02prevent open with jsonviandoxdev-0/+5
2022-11-02merge JsonStd and Std stepsviandoxdev-55/+22
2022-11-01fix json running all the timeviandoxdev-2/+7
2022-11-01Fixes #103816 make --json workviandoxdev-1/+1
2022-10-31Auto merge of #102950 - oli-obk:check_miri, r=RalfJungbors-29/+6
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`