Skip to content

Add --nocapture option to rustdoc - #86230

Merged
bors merged 5 commits into
rust-lang:masterfrom
GuillaumeGomez:nocapture
Jul 19, 2021
Merged

Add --nocapture option to rustdoc#86230
bors merged 5 commits into
rust-lang:masterfrom
GuillaumeGomez:nocapture

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Jun 11, 2021

Copy link
Copy Markdown
Member

Fixes#26309.
Fixes#45724.

Once this PR is merged, I'll send a PR to cargo to also pass --nocapture to rustdoc.

cc @jyn514
r? @camelid

@GuillaumeGomezGuillaumeGomez added A-doctests Area: Documentation tests, run by rustdoc T-rustdoc labels Jun 11, 2021
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomezforce-pushed the nocapture branch 2 times, most recently from 2a895a9 to 8f37814CompareJune 11, 2021 21:40
Comment threadsrc/doc/rustdoc/src/command-line-arguments.md Outdated
Comment threadsrc/librustdoc/config.rs Outdated
Comment threadsrc/librustdoc/doctest.rs Outdated
Comment threadsrc/librustdoc/lib.rs Outdated
Comment threadsrc/librustdoc/markdown.rs Outdated
@camelidcamelid added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2021
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

CI passed. Once this PR is merged, I'll send one to cargo.

@camelidcamelid added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 13, 2021
@jyn514jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-rustdoc-temp labels Jun 22, 2021
Comment threadsrc/librustdoc/doctest.rs Outdated
@camelidcamelid added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2021
@camelid

Copy link
Copy Markdown
Member

Should this PR be marked as closing #45724 as well?

@camelid

Copy link
Copy Markdown
Member

Also, it might be a good idea to test this code against the test case in #55813 to see if it fixes it.

@camelid

Copy link
Copy Markdown
Member

I would also appreciate if you could explain to me a bit the difference between this new flag and --test-args --nocapture :)

@jyn514

Copy link
Copy Markdown
Member

cc @ehuss - I don't know who owns libtest, but I've seen you reviewing a couple PRs, hopefully you have some input :)

@ehuss

ehuss commented Jul 8, 2021

Copy link
Copy Markdown
Contributor

I don't have any particular say in libtest. The libs team owns it, but in general nobody focuses on it.

I'd just echo @camelid's comments. I didn't look closely, but this seems strange that it is still capturing the output. I think the spirit of the --nocapture flag is to avoid capturing at all, to make it easier to debug tests that hang or run slowly or have other issues.

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 16, 2021
@jyn514

Copy link
Copy Markdown
Member

Shouldn't we have a way to pass through all these options to libtest? I wonder if it makes more sense to instead support a --test-args argument.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

nocapture needed changes on rustdoc side as well, but for other arguments, it'd be nice to pass arguments to libtest directly indeed. Can you open an issue for it please?

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 17, 2021
Add --nocapture option to rustdoc
Fixesrust-lang#26309.
Fixesrust-lang#45724.
Once this PR is merged, I'll send a PR to cargo to also pass `--nocapture` to rustdoc.
cc `@jyn514`
r? `@camelid`
@JohnTitor

Copy link
Copy Markdown
Member

Failed in rollup: #87232 (comment)
@bors r-

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2021
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Failure came from the fact that I only "standardized" the stdout and not the stderr...

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

@bors: r=camelid

@bors

bors commented Jul 18, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit d5e3294 has been approved by camelid

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 18, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 19, 2021
…laumeGomez
Rollup of 8 pull requests
Successful merges:
- rust-lang#86230 (Add --nocapture option to rustdoc)
- rust-lang#87210 (Rustdoc accessibility: make the sidebar headers actual headers)
- rust-lang#87227 (Move asm! and global_asm! to core::arch)
- rust-lang#87236 (Simplify command-line argument initialization on unix)
- rust-lang#87251 (Fix "item info" width)
- rust-lang#87256 (Extend HIR-based WF checking to associated type defaults)
- rust-lang#87259 (triagebot shortcut config)
- rust-lang#87268 (Don't create references to uninitialized data in `List::from_arena`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 0fce468 into rust-lang:masterJul 19, 2021
@rustbotrustbot added this to the 1.55.0 milestone Jul 19, 2021
@GuillaumeGomez
GuillaumeGomez deleted the nocapture branch July 19, 2021 12:42
@woshilapin

woshilapin commented Jul 19, 2021

Copy link
Copy Markdown
Contributor

The 2 above tickets have been automatically closed but if I understand correctly, there is still a missing piece in cargo to forward --nocapture to rustdoc, right? Should we reopen them until it's done?

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

The work is done here so it's ok for them to be closed. I'm working on the cargo fix.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-doctestsArea: Documentation tests, run by rustdocS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoctest: --nocapture still hides the output for successful tests rustdoc: support for the --nocapture feature of libtest

10 participants

@GuillaumeGomez@rust-log-analyzer@camelid@jyn514@ehuss@bors@JohnTitor@woshilapin@rust-highfive@rustbot