uv/crates/uv-resolver/src
Charlie Marsh 9a76e47888
Allow multiple pinned indexes in tool.uv.sources (#7769)
## Summary

This PR lifts the restriction that a package must come from a single
index. For example, you can now do:

```toml
[project]
name = "project"
version = "0.1.0"
readme = "README.md"
requires-python = ">=3.12"
dependencies = ["jinja2"]

[tool.uv.sources]
jinja2 = [
    { index = "torch-cu118", marker = "sys_platform == 'darwin'"},
    { index = "torch-cu124", marker = "sys_platform != 'darwin'"},
]

[[tool.uv.index]]
name = "torch-cu118"
url = "https://download.pytorch.org/whl/cu118"

[[tool.uv.index]]
name = "torch-cu124"
url = "https://download.pytorch.org/whl/cu124"
```

The construction is very similar to the way we handle URLs today: you
can have multiple URLs for a given package, but they must appear in
disjoint forks. So most of the code is just adding that abstraction to
the resolver, following our handling of URLs.

Closes #7761.
2024-10-15 22:58:15 +00:00
..
lock Enable environment variable authentication for named indexes (#7741) 2024-10-15 22:35:07 +00:00
pubgrub Enable environment variable authentication for named indexes (#7741) 2024-10-15 22:35:07 +00:00
redirect chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
requires_python Improve major-minor bounds on requires-python (#8145) 2024-10-12 15:48:03 +01:00
resolution Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
resolver Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
bare.rs Add support for parsing unnamed URL requirements (#2567) 2024-03-21 03:28:58 +00:00
candidate_selector.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
dependency_mode.rs Store resolution options in lockfile (#5264) 2024-07-22 08:28:22 -04:00
dependency_provider.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
error.rs Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
exclude_newer.rs switch to jiff from chrono (#6205) 2024-08-20 11:31:46 -05:00
exclusions.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
flat_index.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
fork_indexes.rs Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
fork_urls.rs Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
graph_ops.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
lib.rs Allow multiple pinned indexes in tool.uv.sources (#7769) 2024-10-15 22:58:15 +00:00
manifest.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
marker.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
options.rs Don't recommend --prerelease=allow for source dist builds (#8192) 2024-10-14 21:04:30 -04:00
pins.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
preferences.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
prerelease.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
python_requirement.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
redirect.rs chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
requires_python.rs Improve major-minor bounds on requires-python (#8145) 2024-10-12 15:48:03 +01:00
resolution_mode.rs Use separate types to represent raw vs. resolver markers (#6646) 2024-08-26 18:00:21 +00:00
version_map.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00
yanks.rs Add uv- prefix to all internal crates (#7853) 2024-10-01 20:15:32 -04:00