Skip to content

[rustdoc] Non-json time diagnostics in stdout when using --format json #144798

@arpadav

Description

@arpadav

Location

times.display_times();

or

times.display_times();

Summary

I have not done too much investigation into source code. First posted the issue here

But I noticed #144308 breaks the --format json unstable option, since the time displayed goes to stdout. as a result, if you run something like:

cargo +nightly test --doc -- -Z unstable-options --format json > doc-test.json

then

...
{ "type": "suite", "event": "ok", "passed": 0, "failed": 0, "ignored": 5, "measured": 0, "filtered_out": 0, "exec_time": 0.000229133 }
all doctests ran in 0.17s; merged doctests compilation took 0.17s

this line is at the end of each output. in addition, when using the --workspace flag, it appears after every library is doc-tested.

It can easily be dealt with, but I realized my CICD started failing when parsing this output so I wanted to ask/report

@GuillaumeGomez

Metadata

Metadata

Labels

A-doctestsArea: Documentation tests, run by rustdocT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions