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

feat: extend pixi clean cache with more cache options #1872

Merged

Conversation

ruben-arts
Copy link
Contributor

adds --exec --mapping --repodata to the clean cache function.

Also renames the mapping cache dir to conda-pypi-mapping

Copy link
Contributor

@tdejager tdejager left a 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 😅

@ruben-arts
Copy link
Contributor Author

@tdejager you can already do that with --conda or --pypi

@@ -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";
Copy link
Contributor

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!

Copy link
Contributor Author

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

Copy link
Contributor

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?

crates/pypi_mapping/Cargo.toml Outdated Show resolved Hide resolved
Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
@@ -668,7 +669,9 @@ impl<'p> UpdateContextBuilder<'p> {
let project = self.project;
let package_cache = match self.package_cache {
Copy link
Contributor

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))

@baszalmstra baszalmstra enabled auto-merge (squash) August 22, 2024 11:36
@baszalmstra baszalmstra merged commit 75a26be into prefix-dev:main Aug 22, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants