Skip to content

Printing to stdout/stderr no longer works during rustc bootstrap #43855

Closed
@petrochenkov

Description

@petrochenkov

Any attempt to do "printf debugging" with println, or bootstrapping with -Z time-passes, or outputting any other useful information to stdout from rustc 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 using debug!(...), 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions