-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
rust/cargo: enable caching #4815
Conversation
What happens currently if Also, related: rust-lang/cargo#5183 |
Sometimes a successful install but will fail |
We could probably do the same for brew/Library/Homebrew/rubocops/text_cop.rb Lines 52 to 55 in bfb2d53
|
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.
Makes sense to me, thanks @commitay!
Does it make sense for an enhancement to allow a user to specify their own cache path? As in, if I'm working in Rust regularly, would it be worthwhile for me to be able to set This optional centralization might save significant disk space, but we'd probably want to determine the benefit before spending the time to implement it. |
I suppose we could in theory but we probably wouldn't want to go down that road as people would want similar support for go, npm and everything else. We'd also have to handle any potential conflicts that might arise from the user and Homebrew attempting to access the cache at the same time. |
@colindean FYI you can do that with |
brew style
with your changes locally?brew tests
with your changes locally?The primary intention of this PR is to avoid having to download the complete
crates.io-index
package registry (currently a 125MB download) for each build. The formulae crate dependencies are also cached and can be reused between formulae. This will work without needing any changes to be made in formulae.Similar to #4774 one downside is increased disk usage. Also,
rust
formulae aren't as common (currently 35), but we do seem to be adding them quickly (16 this year so far.)One possible problem that I've encountered with setting
CARGO_HOME
occurs if the install target (i.e."--root", prefix
) isn't set as it will install by default intoCARGO_HOME
.Disclaimer: My internet is terrible, so while this is a decent improvement for me locally it might not actually be that useful.
Removing
cargo_cache
for each formula:The
cargo_cache
size after building all of the above formulae again was 247MB (including the 125MB package registry.)