Skip to content

Don't print rustdoc command lines on failure by default#13387

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:hide-rustdoc-cli-on-failure
Feb 2, 2024
Merged

Don't print rustdoc command lines on failure by default#13387
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:hide-rustdoc-cli-on-failure

Conversation

@alexcrichton

@alexcrichton alexcrichton commented Feb 2, 2024

Copy link
Copy Markdown
Member

This commit lifts a helper function from invoking rustc to additionally being used for invoking rustdoc. This enables hiding the command line invocation of rustdoc by default when it fails, although it's still available to see with --verbose. The intention here is to match the behavior of cargo build for rustc failures here and was inspired by recently running cargo doc and not being able to see the actual failure as the command line ended up taking the whole screen (afterwards I made the screen bigger and that helped too).

Fixes #13386

This commit lifts a helper function from invoking rustc to additionally
being used for invoking rustdoc. This enables hiding the command line
invocation of `rustdoc` by default when it fails, although it's still
available to see with `--verbose`. The intention here is to match the
behavior of `cargo build` for rustc failures here and was inspired by
recently running `cargo doc` and not being able to see the actual
failure as the command line ended up taking the whole screen (afterwards
I made the screen bigger and that helped too).
@rustbot

rustbot commented Feb 2, 2024

Copy link
Copy Markdown
Collaborator

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 2, 2024
@epage

epage commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

Double checking but this fixes #13386, right?

@alexcrichton

Copy link
Copy Markdown
Member Author

Oh wow it definitely does and this was not coordinated at all so turns out we just both ran into it at the same time!

@epage

epage commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

📌 Commit 1439b3f has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 2, 2024
@bors

bors commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

⌛ Testing commit 1439b3f with merge 258fa84...

@bors

bors commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: epage
Pushing 258fa84 to master...

@bors bors merged commit 258fa84 into rust-lang:master Feb 2, 2024
@alexcrichton alexcrichton deleted the hide-rustdoc-cli-on-failure branch February 2, 2024 19:40
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2024
Update cargo

24 commits in 7bb7b539558dc88bea44cee4168b6269bf8177b0..cdf84b69d0416c57ac9dc3459af80dfb4883d27a
2024-01-20 00:15:32 +0000 to 2024-02-02 19:39:16 +0000
- Apply `-Zpanic-abort-tests` to doctests too (rust-lang/cargo#13388)
- Don't print rustdoc command lines on failure by default (rust-lang/cargo#13387)
- Ensure `nonzero_exit_code` test isn't affected by developers `RUST_BACKTRACE` setting (rust-lang/cargo#13385)
- Add `docsrs` cfg as a well known `--check-cfg` (rust-lang/cargo#13383)
- fix(new): Print a note, rather than a comment, for more information (rust-lang/cargo#13371)
- Change tests to support changes to suggestion (rust-lang/cargo#13382)
- chore(ci): enable m1 runner (rust-lang/cargo#13377)
- fix(toml): Improve map/sequence error message (rust-lang/cargo#13376)
- fix(diagnostic): Don't panic on empty spans (rust-lang/cargo#13375)
- doc: Hide `cargo-fetch` description in offline man page (rust-lang/cargo#13364)
- feat: stabilize lockfile v4 (rust-lang/cargo#12852)
- fix(new): Print a 'Creating', rather than 'Created' status (rust-lang/cargo#13367)
- fix: use spec id instead of name to match package (rust-lang/cargo#13335)
- refactor(shell): Use new fancy anstyle API (rust-lang/cargo#13368)
- feat(cargo-update): `--precise` to allow yanked versions (rust-lang/cargo#13333)
- refactor: remove unnecessary Option in `Freshness::Dirty` (rust-lang/cargo#13361)
- doc: Replace version with `latest` for jobserver link (rust-lang/cargo#13366)
- test: data layout fix for `x86_64-unknown-none-gnu` (rust-lang/cargo#13362)
- docs(ref): Try to improve reg auth docs (rust-lang/cargo#13351)
- fix typo of rustbuild, instead of rustuild (rust-lang/cargo#13357)
- fix(config): Deprecate non-extension files (rust-lang/cargo#13349)
- fix(cli): Improve errors related to cargo script (rust-lang/cargo#13346)
- fix list option description starting with uppercase (rust-lang/cargo#13344)
- Fix typo in test (rust-lang/cargo#13342)
@rustbot rustbot added this to the 1.78.0 milestone Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-execution Area: anything dealing with executing the compiler S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

give a better error when rustdoc exits with a non-zero exit code

5 participants