uv/crates
Charlie Marsh f3463b3d08
Heal cache entries with missing source distributions (#7559)
## Summary

`uv cache prune --ci` will remove the source distribution directory. If
we then need to build a _different_ wheel (e.g., you're building a
package that has Python minor version-specific wheels), we fail, because
we expect the source to be there.

Now, if the source is missing, we re-download it. It would be slightly
easier to just _ignore_ that revision, but that would mean we'd also
lose the already-built wheels -- so if you ran against many Python
versions, we'd continuously lose the cached data.

Closes https://github.com/astral-sh/uv/issues/7543.

## Test Plan

We can add tests, but they _need_ to build non-pure Python wheels, which
tends to be expensive...

For reference:

```console
$ cargo run venv --python 3.12
$ cargo run pip install mercurial==6.8.1 --verbose
$ cargo run cache prune --ci
$ cargo run venv --python 3.11
$ cargo run pip install mercurial==6.8.1 --verbose
```

I also did this with a local `.tar.gz` that I downloaded from PyPI.
2024-09-19 20:31:55 +00:00
..
bench Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
cache-key Use hasher to compute resolution hash (#5495) 2024-07-26 23:24:09 +00:00
distribution-filename uv: migrate to rkyv 0.8 2024-09-18 14:49:54 -04:00
distribution-types Treat invalid platform as more compatible than invalid Python (#7556) 2024-09-19 13:25:21 -04:00
install-wheel-rs Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
once-map Use FxHash in uv-auth (#6149) 2024-08-16 13:14:51 -04:00
pep440-rs uv: migrate to rkyv 0.8 2024-09-18 14:49:54 -04:00
pep508-rs Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
platform-tags Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
pypi-types uv: migrate to rkyv 0.8 2024-09-18 14:49:54 -04:00
requirements-txt Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
uv Bump the wheel and sdist cache versions (#7560) 2024-09-19 19:53:06 +00:00
uv-auth Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
uv-build Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
uv-cache Heal cache entries with missing source distributions (#7559) 2024-09-19 20:31:55 +00:00
uv-cache-info Use globwalk for cache-keys matching (#7337) 2024-09-12 15:06:05 -04:00
uv-cli Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
uv-client uv: migrate to rkyv 0.8 2024-09-18 14:49:54 -04:00
uv-configuration Add --no-editable support to uv sync and uv export (#7371) 2024-09-17 14:50:36 +00:00
uv-dev Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
uv-dispatch Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
uv-distribution Heal cache entries with missing source distributions (#7559) 2024-09-19 20:31:55 +00:00
uv-extract Add support for remaining pip-supported file extensions (#7387) 2024-09-14 19:59:07 +00:00
uv-fs Do not error if the CACHEDIR.TAG file exists but cannot be written to (#7550) 2024-09-19 09:39:59 -05:00
uv-git Respect pyproject.toml credentials from user-provided requirements (#7474) 2024-09-17 15:09:11 -04:00
uv-installer Avoid removing seed packages for uv venv --seed environments (#7410) 2024-09-15 22:27:52 +00:00
uv-macros Autogenerate possible values for enums in reference documentation (#5137) 2024-07-17 12:37:33 -04:00
uv-metadata Avoid erroneous version warning for .dist-info (#7444) 2024-09-16 22:32:56 +00:00
uv-normalize uv: migrate to rkyv 0.8 2024-09-18 14:49:54 -04:00
uv-options-metadata Autogenerate possible values for enums in reference documentation (#5137) 2024-07-17 12:37:33 -04:00
uv-pubgrub chore: fix typos (#7366) 2024-09-13 16:25:19 +00:00
uv-python Avoid warning about bad Python interpreter links for empty project environment directories (#7527) 2024-09-19 06:49:35 -05:00
uv-requirements Avoid unnecessary progress bar initializations (#7412) 2024-09-15 18:18:28 +00:00
uv-resolver Compute resolver hints using the final reduced derivation tree (#7546) 2024-09-19 16:06:55 +02:00
uv-scripts Avoid writing invalid PEP 723 scripts on tool.uv.sources (#6706) 2024-08-27 17:49:08 +00:00
uv-settings Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
uv-shell Expand tildes when matching against PATH (#6829) 2024-08-29 19:50:09 +00:00
uv-state Migrate to XDG and Linux strategy for macOS directories (#5806) 2024-08-20 11:31:46 -05:00
uv-tool Improve invalid environment warning messages (#7544) 2024-09-19 09:11:17 -05:00
uv-trampoline Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00
uv-types Allow users to provide pre-defined metadata for resolution (#7442) 2024-09-18 03:18:05 +00:00
uv-version Bump version to 0.4.12 (#7499) 2024-09-18 08:50:04 -05:00
uv-virtualenv Use more verbose spelling of "virtualenv" during creation (#7523) 2024-09-18 21:22:37 -05:00
uv-warnings Upgrade to Rust 1.80.0 (#5472) 2024-07-27 01:49:47 +00:00
uv-workspace Clarify behavior of of overrides in CLI reference (#7537) 2024-09-19 07:02:42 -05:00
README.md Use prettier to format the documentation (#5708) 2024-08-02 08:58:31 -05:00

Crates

bench

Functionality for benchmarking uv.

cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

install-wheel-rs

Install built distributions (wheels) into a virtual environment.]

once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv

Command-line interface for the uv package manager.

uv-build

A PEP 517-compatible build frontend for uv.

uv-cache

Functionality for caching Python packages and associated metadata.

uv-client

Client for interacting with PyPI-compatible HTTP APIs.

uv-dev

Development utilities for uv.

uv-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in uv-types.

uv-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

uv-extract

Utilities for extracting files from archives.

uv-fs

Utilities for interacting with the filesystem.

uv-git

Functionality for interacting with Git repositories.

uv-installer

Functionality for installing Python packages into a virtual environment.

uv-python

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

uv-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

uv-requirements

Utilities for reading package requirements from pyproject.toml and requirements.txt files.

uv-resolver

Functionality for resolving Python packages and their dependencies.

uv-shell

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

uv-virtualenv

A venv replacement to create virtual environments in Rust.

uv-warnings

User-facing warnings for uv.

uv-workspace

Workspace abstractions for uv.

requirements-txt

Functionality for parsing requirements.txt files.