Skip to content

-Ztime-passes and --message-format=json are incompatible #55508

Closed
@matthiaskrgr

Description

@matthiaskrgr
cargo new bla
cd bla
RUSTC_WRAPPER="" RUSTFLAGS="-Ztime-passes" cargo check --message-format=json --verbose
    Checking bla v0.1.0 (/tmp/bla)
     Running `rustc --edition=2018 --crate-name bla src/main.rs --color always --error-format json --crate-type bin --emit=dep-info,metadata -C debuginfo=2 -C metadata=72226aea1ba16fe0 -C extra-filename=-72226aea1ba16fe0 --out-dir /tmp/bla/target/debug/deps -C incremental=/tmp/bla/target/debug/incremental -L dependency=/tmp/bla/target/debug/deps -Ztime-passes`
error: Could not compile `bla`.

Caused by:
  failed to parse process output: `rustc --edition=2018 --crate-name bla src/main.rs --color always --error-format json --crate-type bin --emit=dep-info,metadata -C debuginfo=2 -C metadata=72226aea1ba16fe0 -C extra-filename=-72226aea1ba16fe0 --out-dir /tmp/bla/target/debug/deps -C incremental=/tmp/bla/target/debug/incremental -L dependency=/tmp/bla/target/debug/deps -Ztime-passes` (exit code: 0)

Caused by:
  compiler stdout is not empty: `  time: 0.000; rss: 49MB   parsing`

I was trying to debug a case where json message would eventually OOM my machine but apparently I cannot use time-passes for that :(

meta:

rustc 1.31.0-nightly (d586d5d2f 2018-10-29)
binary: rustc
commit-hash: d586d5d2f51489821b471f20959333558c24b129
commit-date: 2018-10-29
host: x86_64-unknown-linux-gnu
release: 1.31.0-nightly
LLVM version: 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-driverArea: rustc_driver that ties everything together into the `rustc` compilerC-bugCategory: This is a bug.T-compilerRelevant to the compiler 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