-
Notifications
You must be signed in to change notification settings - Fork 198
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
add a subcommand to clean all artifacts created by snfoundry #2723
Comments
There's already |
You also have |
We already have snforge clean <CLEAN_COMPONENTS>... [possible values: coverage, profile, cache, all] To clean everything, you would simply run: snforge clean all To clean only the cache: snforge clean cache You can also specify multiple components at once: snforge clean profile coverage This is also straightforward to implement using #[derive(Parser, Debug)]
pub struct CleanArgs {
#[arg(num_args = 1.., required = true)]
pub clean_components: Vec<CleanComponent>,
}
#[derive(ValueEnum, Debug, Clone)]
pub enum CleanComponent {
Coverage,
Profile,
Cache,
All,
} |
I'd love to work on this!
|
Hey, this issue will be available for taking during the ODBoost https://app.onlydust.com/hackathons/odboost-1. |
Is this issue still available? |
1 similar comment
Is this issue still available? |
Hi, I'd love to take this task! |
May I take this issue on? |
Hey @Nemezjusz what's the status of this? Do you have any kind of draft you can publish already? |
Hey, @cptartur, still working on tests and dir locations but i can make draft and see what you think |
Which component is your feature related to?
Forge
Feature Request
The
snforge
tool can generate a significant number of files when utilized to its fullest potential, including:snfoundry_trace
.snfoundry_cache
coverage
profile
To help manage these files, we propose a
snforge clean
command that facilitates their removal.Command Design
To clean everything, you can use:
To clean only the cache, run:
You can also specify multiple components at once:
Note: The existing
snforge clean-cache
command should be deprecated in favor of the more flexiblesnforge clean cache
.Implementation Details
This is how you can implement the desired CLI using the
clap
crate:To comply with the current command conventions, you should add this branch to the match statement at this line:
Next, create a
clean.rs
file in theforge/src
directory to implement the cleaning logic. To handle directory traversal, you can use the WalkDir crate.Definition of done:
The text was updated successfully, but these errors were encountered: