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: add matchspec caching #2637

Merged
merged 12 commits into from
Dec 9, 2024

Conversation

nichmor
Copy link
Contributor

@nichmor nichmor commented Dec 3, 2024

Overview

This PR adds ability to load already existing tool from the disk.

So if previously we installed boltons==1.0.0, and now we are requesting boltons *, we will preload it.
if we request boltons >= 1.1.0, we will install a new one.
More details are inside the Matches trait : https://github.com/conda/rattler/blob/main/crates/rattler_conda_types/src/match_spec/mod.rs#L364

it also add a new clean command for cache, pixi clean cache --tool to clean build tools envs.

How to test it:

  • remove rattler/cache/cached-build-tool-envs-v0 if exist.
  • run pixi install -vvv for rich_example. You will see in tracing::debug not found any existing environment message, and also cached-build-tool-envs-v0 should now have a folder for installed tool.
  • run again pixi install -vvv . You will see now reusing existing environment in and no new folders should be in cached-build-tool-envs-v0.
  • change build-backend in pixi for this build-backend = { name = "pixi-build-python", version = "<0.1.0dev20241203154923" }. This will make pixi to search for older pixi, that don't satisfisy already installed one.
    run pixi install -vvv and now you will see not found any existing environment for and a new folder for this new tool should be in cached-build-tool-envs-v0.

@nichmor nichmor marked this pull request as ready for review December 5, 2024 16:18
examples/boltons/pixi.toml Outdated Show resolved Hide resolved
src/cli/clean.rs Outdated Show resolved Hide resolved
@tdejager tdejager merged commit 1487040 into prefix-dev:main Dec 9, 2024
23 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.

3 participants