Hangs if procedural macro prints output when stdout is closed #8245
Labels
A-console-output
Area: Terminal output, colors, progress bar, etc.
C-bug
Category: bug
P-high
Priority: High
regression-from-stable-to-beta
Regression in beta that previously worked in stable.
Problem
Running
cargo check | false
(or more realisticallycargo check | head
) hangs if a macro prints more than a small number of lines to stdout.Expected: same behavior as if the macro only prints a small number of lines to stdout, which is to not hang.
Steps
Cargo.toml
src/lib.rs
src/main.rs
Notes
Tested with current master branch of cargo (13bded9) and nightly rustc 1.45.0-nightly (a74d1862d 2020-05-14) on linux.
/path/to/cargo/target/release/cargo check | head
Mentioning @ehuss because Ignore broken console output in some situations. #8236 looks relevant.
Nightly cargo panicks and hangs, so this is not a regression from Ignore broken console output in some situations. #8236 which does eliminate the panic.
I think the hang is cargo not rustc but I can't be sure. Reasoning: I ran
cargo check --verbose
to grab the last rustc invocation before the hang, and ran that rustc invocation piped tohead
, and that did not hang.The text was updated successfully, but these errors were encountered: