Description
Describe the problem you are trying to solve
The console output can be misleading about what's happening in the build. Having lots of sequential Compiling <crate>
lines makes it seem like compilation is serial, and if a slow-building crate X starts building just before a fast-building crate Y, you'll probably think that Y is the slow-building crate. (I was misled in this way about build times of different crates within rustc for a long time.)
The progress bar helps with this, because it shows which crates are currently being built... but only if you have a sufficiently wide terminal. If you have 80 chars you don't see them at all. If you have 100 chars you might see one or two or three, but any crate with a long name greatly reduces the effectiveness.
Also, linking isn't shown. This means people often blame the compiler for slowness when it's the linker's fault.
Describe the solution you'd like
-
Instead of printing
Compiling <crate>
when a crate starts building, printCompiled <crate> in X.YYs
. That would avoid the problem where slowness to build is blamed on the wrong crate. This is a change of tense in the message, but Cargo already mixes present and past tenses, e.g. withDownloaded <crate>
andDownloaded2 3 crates (78.7 KB) in 1.03s
messages. -
Shrink the width of the progress bar, so the crates being built can be seen even on narrow terminals.
-
Show linking as a distinct step, including the time it took, e.g. `Linked in X.YYs".
Notes
My motivation here was comparing console output (which is moderately useful) to -Ztimings
output (which is amazing), and trying to make the former a bit more like the latter.
See also