uv/crates
Andrew Gallant f7bed37a4e uv-resolver: add "include" rules to ResolverEnvironment
When we generate conflict markers for each resolution after the
resolver runs, it turns out that generating them just from exclusion
rules is not sufficient.

For example, if `foo` and `bar` are declared as conflicting extras, then
we end up with the following forks:

    A: extra != 'foo'
    B: extra != 'bar'
    C: extra != 'foo' and extra != 'bar'

Now let's take an example where these forks don't share the same version
for all packages. Consider a case where `idna==3.9` is in forks A and C,
but where `idna==3.10` is in fork B. If we combine the markers in forks
A and C through disjunction, we get the following:

     idna==3.9: extra != 'foo' or (extra != 'foo' and extra != 'bar')
    idna==3.10: extra != 'bar'

Which simplifies to:

     idna==3.9: extra != 'foo'
    idna==3.10: extra != 'bar'

But these are clearly not disjoint. Both dependencies could be selected,
for example, when neither `foo` nor `bar` are active. We can remedy this
by keeping around the inclusion rules for each fork:

    A: extra != 'foo' and extra == 'bar'
    B: extra != 'bar' and extra == 'foo'
    C: extra != 'foo' and extra != 'bar'

And so for `idna`, we have:

     idna==3.9: (extra != 'foo' and extra == 'bar') or (extra != 'foo' and extra != 'bar')
    idna==3.10: extra != 'bar' and extra == 'foo'

Which simplifies to:

     idna==3.9: extra != 'foo'
    idna==3.10: extra != 'bar' and extra == 'foo'

And these *are* properly disjoint. There is no way for them both to be
active. This also correctly accounts for fork C where neither `foo` nor
`bar` are active, and yet, `idna==3.9` is still enabled but `idna==3.10`
is not. (In the [motivating example], this comes from `baz` being enabled.)
That is, this captures the idea that for `idna==3.10` to be installed,
there must actually be a specific extra that is enabled. That's what
makes it disjoint from `idna==3.9`.

We aren't quite done yet, because this does add *too many* conflict
markers to dependency edges that don't need it. In the next commit,
we'll add in our world knowledge to simplify these conflict markers.

[motivating example]: https://github.com/astral-sh/uv/issues/9289
2024-11-23 13:14:27 -05:00
..
uv Re-compile when --compile is passed to an install operation (#9378) 2024-11-23 01:57:04 +00:00
uv-auth Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-bench Rename ResolutionGraph to ResolverOutput (#9103) 2024-11-14 14:51:11 +00:00
uv-build-backend Improve build backend excludes (#9281) 2024-11-21 12:20:29 +01:00
uv-build-frontend Avoid validating extra and group sources in build-system.requires (#9273) 2024-11-20 09:05:50 -05:00
uv-cache Add dedicated cache method for creating build directories (#8910) 2024-11-08 00:50:55 +00:00
uv-cache-info Improve error message for cache info serialization (#8500) 2024-10-23 13:17:31 +00:00
uv-cache-key Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-cli Remove --upgrade, --no-upgrade, and --upgrade-package from uv tool upgrade (#9318) 2024-11-21 09:35:57 -05:00
uv-client Add retries for Python downloads (#9274) 2024-11-20 09:42:42 -05:00
uv-configuration Annotate default groups in conflict error messages (#9368) 2024-11-22 21:13:15 +00:00
uv-console Support interactive input in uv publish (#8158) 2024-10-15 10:00:43 +02:00
uv-dev Reorganize the project concept documentation (#9121) 2024-11-19 13:52:12 -06:00
uv-dirs Eliminate dependencies on directores and dirs-sys (#8048) 2024-11-07 14:29:54 -06:00
uv-dispatch Show full derivation chain when encountering build failures (#9108) 2024-11-14 15:48:26 -05:00
uv-distribution Avoid validating extra and group sources in build-system.requires (#9273) 2024-11-20 09:05:50 -05:00
uv-distribution-filename Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-distribution-types Unify cargo features (#9267) 2024-11-20 16:11:24 +01:00
uv-extract Sanitize filenames during zip extraction (#8732) 2024-10-31 19:12:51 +00:00
uv-fs Avoid empty user display paths (#9312) 2024-11-21 14:56:50 -05:00
uv-git Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-globfilter Improve build backend excludes (#9281) 2024-11-21 12:20:29 +01:00
uv-install-wheel Refactor shell quoting (#9055) 2024-11-15 09:06:54 +00:00
uv-installer Show full derivation chain when encountering build failures (#9108) 2024-11-14 15:48:26 -05:00
uv-macros Generate environment variables doc from code (#8493) 2024-11-03 08:31:38 -06:00
uv-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-normalize Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-once-map Use shared resolver state between add and lock (#8146) 2024-10-12 14:58:07 +00:00
uv-options-metadata Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-pep440 Remove separate test files in favor of same-file mod tests (#9199) 2024-11-18 20:11:46 +00:00
uv-pep508 uv-pep508: add MarkerTree::implies 2024-11-23 13:14:27 -05:00
uv-performance-flate2-backend Use zlib-rs on all platforms (#9264) 2024-11-20 00:01:58 -05:00
uv-performance-memory-allocator Run cargo update (#8703) 2024-11-01 10:26:21 -04:00
uv-platform-tags Fix Python interpreter discovery on non-glibc hosts (#9005) 2024-11-21 12:35:02 +01:00
uv-publish Use exponential backoff for publish retries (#9276) 2024-11-20 15:02:33 +00:00
uv-pypi-types Avoid validating extra and group sources in build-system.requires (#9273) 2024-11-20 09:05:50 -05:00
uv-python Add various grammar changes to conflict error messages (#9369) 2024-11-22 22:23:13 +00:00
uv-requirements Only respect preferences across the same indexes (#9302) 2024-11-20 22:26:43 -05:00
uv-requirements-txt Add dedicated warning for empty stdin (#9256) 2024-11-19 17:52:41 -05:00
uv-resolver uv-resolver: add "include" rules to ResolverEnvironment 2024-11-23 13:14:27 -05:00
uv-scripts Use existing index field in PEP 723 scripts (#9238) 2024-11-19 14:45:12 -05:00
uv-settings Build backend: Support data files (#9197) 2024-11-19 12:59:59 +01:00
uv-shell Refactor shell quoting (#9055) 2024-11-15 09:06:54 +00:00
uv-state Add uv-dirs to consolidate directory lookup methods (#8453) 2024-10-22 11:33:25 -05:00
uv-static docs: reference --no-progress option in related environment variable (#9357) 2024-11-22 14:51:53 +00:00
uv-tool Eliminate dependencies on directores and dirs-sys (#8048) 2024-11-07 14:29:54 -06:00
uv-trampoline Update Rust crate fs-err to v3 (#8625) 2024-11-19 15:09:00 +00:00
uv-trampoline-builder Add support for installing versioned Python executables on Windows (#8663) 2024-10-31 15:58:35 +00:00
uv-types Refactor Resolution type to retain dependency graph (#9106) 2024-11-14 15:25:34 -05:00
uv-version Bump version to v0.5.4 (#9290) 2024-11-20 16:01:24 -05:00
uv-virtualenv Allow apostrophe in venv name (#8984) 2024-11-15 10:52:10 +01:00
uv-warnings chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-workspace Fix grammar in missing platform marker error message (#9240) 2024-11-19 20:03:52 +00:00
README.md Link to Dependency specifiers instead of PEP 508 (#8411) 2024-10-21 14:43:38 -04:00

Crates

uv-bench

Functionality for benchmarking uv.

uv-cache-key

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

uv-distribution-filename

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

uv-distribution-types

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

uv-install-wheel-rs

Install built distributions (wheels) into a virtual environment.

uv-once-map

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

uv-pep440-rs

Utilities for interacting with Python version numbers and specifiers.

uv-pep508-rs

Utilities for parsing and evaluating dependency specifiers, previously known as PEP 508.

uv-platform-tags

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

uv-cli

Command-line interface for the uv package manager.

uv-build-frontend

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

uv-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.

uv-requirements-txt

Functionality for parsing requirements.txt files.