-
Notifications
You must be signed in to change notification settings - Fork 180
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: extend pixi clean cache with more cache options #1872
feat: extend pixi clean cache with more cache options #1872
Conversation
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.
Would it be possible to clear the packages cache only as well? I want that often 😅
@tdejager you can already do that with |
crates/pixi_consts/src/consts.rs
Outdated
@@ -19,7 +19,12 @@ pub const SOLVE_GROUP_ENVIRONMENTS_DIR: &str = "solve-group-envs"; | |||
pub const PYPI_DEPENDENCIES: &str = "pypi-dependencies"; | |||
pub const TASK_CACHE_DIR: &str = "task-cache-v0"; | |||
pub const PIXI_UV_INSTALLER: &str = "uv-pixi"; | |||
pub const CONDA_PACKAGE_CACHE_DIR: &str = "pkgs"; | |||
pub const CONDA_REPODATA_CACHE_DIR: &str = "repodata"; |
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.
These values are also in rattler_cache
we should use those!
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.
Now using those, added rattler_cache
as a dep to the main pixi and use it as a workspace dep in pixi_consts
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.
can we then get rid of these constants? or reexport them?
Co-authored-by: Bas Zalmstra <[email protected]>
@@ -668,7 +669,9 @@ impl<'p> UpdateContextBuilder<'p> { | |||
let project = self.project; | |||
let package_cache = match self.package_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.
I think we can simplify this part by using combinators
let package_cache = self.package_cache.or_else(|| pixi_config::get_cache_dir()?.join(consts::CONDA_PACKAGE_CACHE_DIR))
adds
--exec
--mapping
--repodata
to theclean cache
function.Also renames the mapping cache dir to
conda-pypi-mapping