Repository navigation
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 |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
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 stylewith your changes locally?brew testswith your changes locally?The primary intention of this PR is to avoid having to download the complete
crates.io-indexpackage 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,
rustformulae 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_HOMEoccurs 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_cachefor each formula:The
cargo_cachesize after building all of the above formulae again was 247MB (including the 125MB package registry.)