Skip to content
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 which config options should be exposed and their defaults #13061

Open
ehuss opened this issue Nov 28, 2023 · 0 comments
Open

gc: Determine which config options should be exposed and their defaults #13061

ehuss opened this issue Nov 28, 2023 · 0 comments
Labels
A-configuration Area: cargo config files and env vars S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-gc Nightly: garbage collection

Comments

@ehuss
Copy link
Contributor

ehuss commented Nov 28, 2023

The current implementation from #12634 exposes a large number of low-level config options for configuring how automatic gc works. I'm uncomfortable having so many low-level options, and I would like to slim it down if possible. However, I'm uncertain what use cases would dictate what the user would actually want to change.

I think gc.auto.frequency needs to stay, but the rest should probably change? One idea I had was to separate based on "things that can be recreated" from "things that require downloading", which is essentially how the 1 month/3 month distinction happens.

# Example config.toml file.

# This table defines the behavior for automatic garbage collection.
[gc.auto]
# The maximum frequency that automatic garbage collection happens.
# Can be "never" to disable automatic-gc, or "always" to run on every command.
frequency = "1 day"
# Anything older than this duration will be deleted in the source cache.
max-src-age = "1 month"
# Anything older than this duration will be deleted in the compressed crate cache.
max-crate-age = "3 months"
# Any index older than this duration will be deleted from the index cache.
max-index-age = "3 months"
# Any git checkout older than this duration will be deleted from the checkout cache.
max-git-co-age = "1 month"
# Any git clone older than this duration will be deleted from the git cache.
max-git-db-age = "3 months"
@ehuss ehuss added A-configuration Area: cargo config files and env vars S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-gc Nightly: garbage collection labels Nov 28, 2023
@ehuss ehuss changed the title gc: Determine which config options should be exposed gc: Determine which config options should be exposed and their defaults Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. Z-gc Nightly: garbage collection
Projects
None yet
Development

No branches or pull requests

1 participant