-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo buffers stdout even with TERM=dumb #6641
Comments
This is likely related to cargo capturing JSON from the compiler. |
It is unrelated to JSON which uses a separate code path (only if I'm not sure I understand the issue. Is miri sending information without a trailing |
Miri runs an arbitrary program, and that program sends information without a trailing |
Python has an "unbuffered" option - |
FWIW Miri these days uses |
Without a use case needing this anymore, I'm going to go ahead and close this. If there is a reason for us to re-evaluate this, let us know! |
Problem
Even with
TERM=dumb
, cargo buffersstderrstdout, meaning I do not see things printed to stdout without a trailing\n
.For Miri, we use
cargo rustc
set up RUSTC_WRAPPER such that we can intercept the call that builds a binary, to instead run it with Miri. Unfortunately, if the application prints to stdout, that output is buffered by Cargo. This is a problem in particular when running a test suite, because it means I cannot see which test is taking long when the test suite just stops.Possible Solution(s)
When Cargo prints no progress bar, it should leave stdout of the running application entirely unmodified, and not introduce any additional line buffering.
Notes
Output of
cargo version
: cargo 1.34.0-nightly (2458180 2019-01-27)The text was updated successfully, but these errors were encountered: