-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(tests): Reduce cargo-remove setup load #12184
Conversation
Benefits - Clarifies a tests needs - Speeds up testing, especially on Windows - Reduces disk space issues within CI
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests still have a relatively huge setup. Is it possible to know the disk usage before and after this PR? Having data as proof would be great.
It's not terribly bad so feel free to merge on my behalf :)
This was a fast pass that only looked at what packages are referenced and did not try to dig in to see what packages may be removed from being referenced while still getting what we want out of the test (e.g. verifying we only touch certain tables, verifying we don't change formatting). Considering this dropped us from publishing 70 packages per test to 9 is a pretty big win for the time put in @bors r=weihanglo |
How did I miss that there is a for loop! |
☀️ Test successful - checks-actions |
Update cargo 17 commits in 64fb38c97ac4d3a327fc9032c862dd28c8833b17..f7b95e31642e09c2b6eabb18ed75007dda6677a0 2023-05-23 18:53:23 +0000 to 2023-05-30 19:25:02 +0000 - chore: detect the channel a PR wants to merge into (rust-lang/cargo#12181) - refactor: de-depulicate `make_dep_prefix` implementation (rust-lang/cargo#12203) - Re-enable code_generation test on Windows (rust-lang/cargo#12199) - docs: add doc comments for git source and friends (rust-lang/cargo#12192) - test: set retry sleep to 1ms for all tests (rust-lang/cargo#12194) - fix(add): Reduce the chance we re-format the user's `[features]` table (rust-lang/cargo#12191) - test(add): Remove expensive test (rust-lang/cargo#12188) - Add a description of `Cargo.lock` conflicts in the Cargo FAQ (rust-lang/cargo#12185) - refactor(tests): Reduce cargo-add setup load (rust-lang/cargo#12189) - Warn when an edition 2021 crate is in a virtual workspace with default resolver (rust-lang/cargo#10910) - refactor(tests): Reduce cargo-remove setup load (rust-lang/cargo#12184) - chore: Lexicographically order `-Z` flags (rust-lang/cargo#12182) - chore(ci): remove temporary fix for rustup 1.24.1 (rust-lang/cargo#12180) - fix: AIX searches dynamic libraries in `LIBPATH`. (rust-lang/cargo#11968) - deps: remove unused features from windows-sys (rust-lang/cargo#12176) - Automatically inherit workspace lints when running cargo new/init (rust-lang/cargo#12174) - Test that the new `debuginfo` options match between cargo and rustc (rust-lang/cargo#12022) r? `@ghost`
Update cargo 17 commits in 64fb38c97ac4d3a327fc9032c862dd28c8833b17..f7b95e31642e09c2b6eabb18ed75007dda6677a0 2023-05-23 18:53:23 +0000 to 2023-05-30 19:25:02 +0000 - chore: detect the channel a PR wants to merge into (rust-lang/cargo#12181) - refactor: de-depulicate `make_dep_prefix` implementation (rust-lang/cargo#12203) - Re-enable code_generation test on Windows (rust-lang/cargo#12199) - docs: add doc comments for git source and friends (rust-lang/cargo#12192) - test: set retry sleep to 1ms for all tests (rust-lang/cargo#12194) - fix(add): Reduce the chance we re-format the user's `[features]` table (rust-lang/cargo#12191) - test(add): Remove expensive test (rust-lang/cargo#12188) - Add a description of `Cargo.lock` conflicts in the Cargo FAQ (rust-lang/cargo#12185) - refactor(tests): Reduce cargo-add setup load (rust-lang/cargo#12189) - Warn when an edition 2021 crate is in a virtual workspace with default resolver (rust-lang/cargo#10910) - refactor(tests): Reduce cargo-remove setup load (rust-lang/cargo#12184) - chore: Lexicographically order `-Z` flags (rust-lang/cargo#12182) - chore(ci): remove temporary fix for rustup 1.24.1 (rust-lang/cargo#12180) - fix: AIX searches dynamic libraries in `LIBPATH`. (rust-lang/cargo#11968) - deps: remove unused features from windows-sys (rust-lang/cargo#12176) - Automatically inherit workspace lints when running cargo new/init (rust-lang/cargo#12174) - Test that the new `debuginfo` options match between cargo and rustc (rust-lang/cargo#12022) r? `@ghost`
This reduces the number of packages published in tests. This is an artifact of when I changed
cargo-edit
from relying on crates.io to test-generated published packages. I took the fastest path to making that conversion and took the shortcut of creating everything for every test. I had assumed the cost was low but @Muscraft noticed that this takes up a lot of space which we run out of on CI occasionally and I expect a lot of small files are slowing down windows.This only updates
cargo-remove
. I'll be doing a follow up forcargo-add
.