-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Printing to stdout/stderr no longer works during rustc bootstrap #43855
Comments
I believe this is because we switched to calling Cargo with That seems definitely fixable in Cargo (just forwarding stdout from the compiler) but I'm not entirely sure why printing to stderr wouldn't work, in theory it should get forwarded all the way out. In rustbuild we don't even try to capture stderr... |
Just ran into this myself. |
Not sure about |
Any attempt to do "printf debugging" with
println
, or bootstrapping with-Z time-passes
, or outputting any other useful information to stdout fromrustc
results in "failed to parse process output" reported from Cargo (https://github.com/rust-lang/cargo/blob/668d55cc6d54c7e9635c924c252621f5e6664e00/src/cargo/util/process_builder.rs#L205).This is a regressions from the recent few months, I believe.
Printf debugging can be emulated with hacks like
sess.span_warn()
or similar, or by recompiling everything and usingdebug!(...)
, but I haven't found a workaround for time-passes yet.Writing to stderr (e.g.
eprintln
) doesn't work as well, the output is silently ignored for some reason, but I haven't investigated why this happens. (UPDATE: The stderr issue was fixed in #47634)Any workarounds are appreciated.
cc someone familiar with Cargo and infrastructure @Mark-Simulacrum @alexcrichton
The text was updated successfully, but these errors were encountered: