-
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
Skip extracting .cargo-ok files from packages #8835
Skip extracting .cargo-ok files from packages #8835
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Looks pretty reasonable to me, thanks! I think you can write a test for this with |
f58b8d7
to
74d664c
Compare
This fixes the case where a package contained an empty .cargo-ok file and was mounted in a read only file system. This lead to attempting to download the package again, which failed due to write permissions.
74d664c
to
05a8127
Compare
I also changed the fix when adding the tests, Alex. Now it just creates the lock file after unpacking, rather than skipping extracting a lock file from the package. |
@bors: r+ Looks great to me, thanks! |
📌 Commit 05a8127 has been approved by |
☀️ Test successful - checks-actions |
FWIW, I was intending for this to skip the |
Update cargo 5 commits in d5556aeb8405b1fe696adb6e297ad7a1f2989b62..8662ab427a8d6ad8047811cc4d78dbd20dd07699 2020-11-04 22:20:36 +0000 to 2020-11-12 03:47:53 +0000 - Check if rust-src contains a vendor dir, and patch it in (rust-lang/cargo#8834) - Improve performance of almost fresh builds (rust-lang/cargo#8837) - Use u32/64::to/from_le_bytes instead of bit fiddling (rust-lang/cargo#8847) - Avoid constructing an anyhow::Error when not necessary (rust-lang/cargo#8844) - Skip extracting .cargo-ok files from packages (rust-lang/cargo#8835)
Update cargo 5 commits in d5556aeb8405b1fe696adb6e297ad7a1f2989b62..8662ab427a8d6ad8047811cc4d78dbd20dd07699 2020-11-04 22:20:36 +0000 to 2020-11-12 03:47:53 +0000 - Check if rust-src contains a vendor dir, and patch it in (rust-lang/cargo#8834) - Improve performance of almost fresh builds (rust-lang/cargo#8837) - Use u32/64::to/from_le_bytes instead of bit fiddling (rust-lang/cargo#8847) - Avoid constructing an anyhow::Error when not necessary (rust-lang/cargo#8844) - Skip extracting .cargo-ok files from packages (rust-lang/cargo#8835)
This is for #8816
I'll look into adding a unit test tomorrow, I'm still familiarising myself with the project.