mirror of https://github.com/astral-sh/uv
## 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 https://github.com/astral-sh/uv/issues/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" ``` |
||
|---|---|---|
| .. | ||
| built_wheel_metadata.rs | ||
| mod.rs | ||
| revision.rs | ||