-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute superset of existing and required hashes when healing cache (#…
…8955) ## Summary The basic issue here is that `uv add` will compute and store a hash for each package. But if you later run `uv pip install` _after_ `uv cache prune --ci`, we need to re-download the source distribution. After re-downloading, we compare the hashes before and after. But `uv pip install` doesn't compute any hashes by default. So the hashes "differ" and we error. Instead, we need to compute a superset of the already-existing and newly-requested hashes when performing this re-download. (In practice, this will always be SHA-256.) Closes #8929. ## Test Plan ```shell export UV_CACHE_DIR="$PWD/cache" rm -rf "$UV_CACHE_DIR" .venv .venv-2 pyproject.toml uv.lock echo $(uv --version) uv init --name uv-cache-issue cargo run add --python 3.13 "pycairo" uv cache prune --ci rm -rf .venv .venv-2 uv venv --python python3.11 .venv-2 . .venv-2/bin/activate cargo run pip install "pycairo" ```
- Loading branch information
1 parent
f29634b
commit 0b5a061
Showing
2 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters