Description
Describe the problem you are trying to solve
In some cases, Cargo builds the same code in parallel. For example, cargo test
will build the library as a test, and concurrently as an rlib to link for doctests or integration tests. This can cause confusion when compiler messages appear twice.
Describe the solution you'd like
Cargo should track which messages have been generated, and remove duplicates.
Notes
There are some challenges with how this will be implemented. For example, rustc
emits some summary messages that can be difficult to deduplicate correctly, particularly the warning count warning: 1 warning emitted
. The implementation will need to carefully consider these edge cases.
This may also need to consider displaying a summary of deduplicated (hidden) messages, although I am less certain about that.