TaKO8Ki / frum

A little bit fast and modern Ruby version manager written in Rust
MIT License
629 stars 15 forks source link

Add frum clean command #79

Closed citizen428 closed 1 year ago

citizen428 commented 3 years ago

This PR adds a frum clean command for removing old downloads from the temporary installation directory (default: ~/.frum/versions/.downloads). This removed ~3GB of old downloads for me. It's also one of the steps mentioned in #78.

changelog:

citizen428 commented 3 years ago

This fails because I forgot to update the shell completions, will do that later today.

Edit: updating the completions is sort of the hardest part of contributing to this project. There's a lot of trailing whitespace and if that gets accidentally removed (i.e. by editors automatically fixing it) the failed test run shows no proper diff.

TaKO8Ki commented 3 years ago

@citizen428

I was expecting that frum install don't leave any old downloads. In fact, I didn't find any old downloads under ~/.frum/versions/.downloads after installing Ruby 2.6.5 and 2.7.0. What did you find under the directory specifically? And If frum install leaves old downloads, I think we should modify install command in order not to do so.

https://user-images.githubusercontent.com/41065217/120660665-8476a680-c4c2-11eb-8c3d-815e9ccb44ac.mov

citizen428 commented 3 years ago

@TaKO8Ki I found about 12 temp directories totaling about 3 GB. Sure, that's probably because I sometimes started installs that I manually canceled (mostly when developing and trying out stuff) but there is any number of reasons a build could fail and not clean up after itself.

The real reason I added this though is that we discussed it as part of #78, i.e. to implement --configure-help we may want to be able to fetch, maybe build from the same source repeatedly and then manually remove.

Plus, we could potentially extend this to something like frum clean --implode or similar which becomes a complete uninstall command, removing all installed Ruby versions and potentially frum itself.

LMK what you think.

citizen428 commented 3 years ago

It's been almost two months now, any idea what we're gonna do with this PR @TaKO8Ki?

TaKO8Ki commented 3 years ago

@citizen428 Sorry for the late reply. Implementing clean command sounds good. Can I have more time to consider how to implement it in detail?

citizen428 commented 2 years ago

@TaKO8Ki Feel free to just close this if we're not going to merge it 😃

blakeperdue commented 1 year ago

@citizen428 @TaKO8Ki this should be implemented. It's a very useful command to have for those of us with small drives and not a lot of free space.

citizen428 commented 1 year ago

@blakeperdue I can't merge it myself and it seems that this is no longer actively worked on, so I'll close my PR.