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
feat: add pixi clean
command
#1325
base: main
Are you sure you want to change the base?
Conversation
I'm not happy with the cli yet. I want Edit: fixed |
/// Clean only the conda related cache. | ||
#[arg(long)] | ||
pub conda: bool, | ||
// TODO: Would be amazing to have a --unused flag to clean only the unused cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just my 2 cents - we need to be sure that we can support windows with this. I think they don't have inode count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's also why I didn't do it right now 😄
src/cli/clean.rs
Outdated
)); | ||
|
||
// Ignore errors | ||
let _ = tokio::fs::remove_dir_all(&folder).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to log the errors ? ( maybe with debug?)
|
||
if let Some(explicit_env) = explicit_environment { | ||
remove_folder_with_progress(explicit_env.dir(), true).await?; | ||
tracing::info!("Skipping removal of task cache and solve group environments for explicit environment '{:?}'", explicit_env.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add the same tracing:info for else
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really skipping anything in that part so there everything would be logged by either the progress bar or other info's
In some systems (e.g.
|
@bollwyvl I like this idea! |
Initial proposal
Includes
pixi clean
cleans environmentspixi clean -e prod
cleans a environmentpixi clean cache
cleans cache dirpixi clean cache --conda/--pypi
cleans a specific package cachefixes: #1321