-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Problem
I have a crate with a couple hundred dependencies for testing clippy/rustc.
When I cargo clippy
on it in a way that it will generate A LOT of warnings, clippy will take several minutes to run on it but not OOM.
Running the same command again, (as cargo tries to load the error messages from cache I assume), I can see that cargo is trying to occupy 12+ gigabyte of ram within <30 seconds and I have to abort the process manually.
target/debug/.fingerprint/unicode-normalization-4895d5af05ae5f63/output
is 11 gigabyte in size.
Steps
Run
RUSTC_BOOTSTRAP=1 RUSTFLAGS="-Z force-unstable-if-unmarked" RUST_BACKTRACE=full cargo clippy --all-targets --all-features -vvvv -- --cap-lints warn -W clippy::internal -W clippy::pedantic -W clippy::nursery -W missing-doc-code-examples -W absolute-paths-not-starting-with-crate -W bare-trait-objects -W box-pointers -W elided-lifetimes-in-paths -Wellipsis-inclusive-range-patterns -W keyword-idents -W macro-use-extern-crate -W missing-copy-implementations -W missing-debug-implementations -W missing-docs -W single-use-lifetimes -W trivial-casts -W trivial-numeric-casts -W unreachable-pub -W unsafe-code -W unstable-features -W unused-extern-crates -W unused-import-braces -W unused-labels -Wunused-lifetimes -Wunused-qualifications -Wunused-results -Wvariant-size-differences
twice on a crate that depends on unicode-normalization 0.1.7
Possible Solution(s)
Notes
I'm not sure why loading the messages seems to eat so much ram while printing/storing them was not that excessive.
Output of cargo version
:
cargo 1.41.0-nightly (626f0f4 2019-12-03)