-
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
Slightly optimize cargo vendor
#8937
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've noticed recently that `cargo vendor` feels really sluggish and slow, and apparently this is primarily because we delete the registry caches and re-extract all the tarballs. This commit implements one possible optimization without changing this, however, which is that currently we both copy a file and checksum it, but that ends up reading all the contents twice. Those two functions are now folded into one, shaving about 3s locally from Cargo's own vendor times.
r? @Eh2406 (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Dec 3, 2020
Seams good. |
@bors r=Eh2406 |
📌 Commit 01f1c01 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 4, 2020
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 8, 2020
Update cargo 10 commits in 63d0fe43449adcb316d34d98a982b597faca4178..d274fcf862b89264fa2c6b917b15230705257317 2020-12-02 01:44:30 +0000 to 2020-12-07 23:08:44 +0000 - Clarify cargo manifest edition field docs (rust-lang/cargo#8953) - Run rustdoc doctests relative to the workspace (rust-lang/cargo#8954) - Workaround fs issue in `cargo publish`. (rust-lang/cargo#8950) - Fix panic with -Zbuild-std and no roots. (rust-lang/cargo#8942) - Slightly optimize `cargo vendor` (rust-lang/cargo#8937) - Fixes rust-lang/cargo#8783 , cargo new fails without a author name or email (rust-lang/cargo#8912) - Fix test escaping __CARGO_TEST_ROOT (rust-lang/cargo#8929) - Add period to allowed feature name characters. (rust-lang/cargo#8932) - faq: small fixes (rust-lang/cargo#8931) - Fix semver documentation tests. (rust-lang/cargo#8930)
This was referenced Feb 4, 2021
This was referenced May 7, 2021
danieldk
added a commit
to danieldk/nixpkgs
that referenced
this pull request
May 8, 2021
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in which cargo vendor erroneously changed permissions of vendored crates. This was fixed in Rust 1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are potentially broken. This change updates cargoSha256/cargoHash tree-wide. Fixes NixOS#121994.
jonringer
pushed a commit
to NixOS/nixpkgs
that referenced
this pull request
May 8, 2021
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in which cargo vendor erroneously changed permissions of vendored crates. This was fixed in Rust 1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are potentially broken. This change updates cargoSha256/cargoHash tree-wide. Fixes #121994.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed recently that
cargo vendor
feels really sluggish andslow, and apparently this is primarily because we delete the registry
caches and re-extract all the tarballs. This commit implements one
possible optimization without changing this, however, which is that
currently we both copy a file and checksum it, but that ends up reading
all the contents twice. Those two functions are now folded into one,
shaving about 3s locally from Cargo's own vendor times.