Skip to content

Conversation

SomeoneToIgnore
Copy link
Contributor

The former does not show any output before the test is finished, which prevents long-running/stuck tests from showing any useful information.

Example: https://github.com/zed-industries/zed/blob/5b0a2f1ab66aec068a837e4d66612ba92b59a29c/crates/project/src/project_tests.rs#L8843-L8845

This is a test that repeats 10 times, each time printing the iteration number.

nocapture.mov

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2025
@SomeoneToIgnore SomeoneToIgnore changed the title Replace --show-output with --nocapture Replace --show-output task defaults with --nocapture Oct 5, 2025
@ChayimFriedman2
Copy link
Contributor

There was a discussion about this in the past, I need to find it. Without inspecting the points raised in that discussion we cannot proceed with this change.

@ChayimFriedman2
Copy link
Contributor

Also note that you can customize this.

@ChayimFriedman2
Copy link
Contributor

Found it: #12737.

The former does not show any output before the test is finished, which prevents long-running/stuck tests from showing any useful information.
@SomeoneToIgnore
Copy link
Contributor Author

SomeoneToIgnore commented Oct 5, 2025

Yeah, no worries and feel free to close if not needed.

My main motivation is to have a default that produces normal output and does not require me to re-confgure every machine's rust-analyzer.

@ChayimFriedman2
Copy link
Contributor

I'm not rejecting this. I'm just saying that if you want this, you need to read and summarize that issue, answer the points raised there, and then we'll discuss that in the team and decide.

@SomeoneToIgnore
Copy link
Contributor Author

I did an offline discussion with @Veykril (seemed onboard as experiences the same chores) and fully agree with #12737 (comment)

The only other useful bit of information is #12737 (comment) and that does not contradict my stance it seems.

I'll leave the rest of the discussion on you.

@ChayimFriedman2
Copy link
Contributor

CC @rust-lang/rust-analyzer.

My personal opinion: I slightly prefer --nocapture (once a while I need to debug a segfaulting/hanging/... test then I copy the test command and run it in the terminal and change --show-output to --nocapture) but not strongly, not even enough that I'll care to change the default. I also don't suffer from interleaved output because I don't run more than one test at a time via rust-analyzer.

@Veykril
Copy link
Member

Veykril commented Oct 5, 2025

Imo we should've reverted to --nocapture a long time ago. It is just so annoying when you have a test that hangs or hard crashes not produce output. And I don't think I've ever run into interleaved output issues either.

@lnicola
Copy link
Member

lnicola commented Oct 7, 2025

Agreed, especially in the --exact case.

@Veykril Veykril added this pull request to the merge queue Oct 7, 2025
Merged via the queue into rust-lang:master with commit 3cde236 Oct 7, 2025
16 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 7, 2025
@SomeoneToIgnore SomeoneToIgnore deleted the nocapture branch October 7, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants