Description
I am seeing an unfortunate phenomenon where, since I have a lot of crates that are used in a lot of projects, statistically it happens very often that Cargo prints "Compiling [one of my crates]" immediately followed by a compiler diagnostic from some totally unrelated crate. The user sees something like the following and understands it to mean that the error occurred while compiling quote
, which is true in a sense because the crates are compiling in parallel, but quite misleading.
$ cargo build
...
Compiling quote v1.0.7
error[E0412]: cannot find type `DeviceState` in this scope
--> /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/device_query-0.2.7/src/lib.rs:39:22
|
39 | impl DeviceQuery for DeviceState {
| ^^^^^^^^^^^ not found in this scope
I have been seeing a rising number of misdirected bug reports on my crates due to this behavior.
I think it would help a lot if Cargo could guarantee that compiler diagnostics were always printed below "Compiling [that exact crate]" (or equivalently labeled in some way), even if it means double-printing "Compiling [that exact crate]" or some terminal UI hack.