-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
gc: Determine CLI design for manual cleaning #13060
Comments
Quick scan of brew
One complaint that came up was " |
We should probably step back and enumerate what the required use cases are and the "if it works" use cases. |
I like the way pnpm approaches this,
|
Regarding the concern of deleting crates that might still be in use, I like how rushjs asks you to pass an --unsafe flag to it's purge command, https://rushjs.io/pages/commands/rush_purge/
|
it sounds like In #13137 I bring up the idea to build on top of the work to track workspaces in #13136 so we pin entries not in current lockfiles. To extend this to clean up everything has the risk is if a project is transient (e.g. removable media) or moved but a new command wasn't run to register the new location. If its manually done with a command, rather than part of the auto-gc, then that might be reasonable, especially if we swap the logic and have a
I don't think an Any "in use" concerns we have are more about "relevant to the user" and not "file descriptors are open" and is mostly relevant for slow networks/systems and offline usage (I don't want a rarely used dependency being removed just before I go on an airplane to do development offline). |
The current implementation from #12634 exposes a
cargo clean gc
subcommand to handle manually cleaning cache data. It is not clear what the final CLI design should be (and it is not clear exactly what the user scenarios are for when they would want to take manual control). This issue is tracking for determining what the CLI should look like. There are few different considerations:cargo cache
is already in use by a third-party commandcargo gc
(reserved by a third-party, but unused), was part of early proposals (cargo doesn't handle unstable top-level subcommands very well)cargo clean gc
— the current implementationcargo clean
— just fold the functionality into a single command which handles cleaning caches. @epage has concerns that this is overloading a subcommand used for different types of caches (local vs global, etc.).cargo maintenance
— just an idea stolen from gitThe text was updated successfully, but these errors were encountered: