mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 18:36:44 +00:00
As user, you specify a list of extras. Internally, we decompose this
into one virtual package per extra. We currently leak this abstraction
by writing one entry per extra to the lockfile:
```toml
[[distribution]]
name = "foo"
version = "4.39.0.dev0"
source = { editable = "." }
dependencies = [
{ name = "pandas" },
{ name = "pandas", extra = "excel" },
{ name = "pandas", extra = "hdf5" },
{ name = "pandas", extra = "html", marker = "os_name != 'posix'" },
{ name = "pandas", extra = "output-formatting", marker = "os_name == 'posix'" },
{ name = "pandas", extra = "plot", marker = "os_name == 'posix'" },
]
```
Instead, we should merge the extras into a list of extras, creating a
more concise lockfile:
```toml
[[distribution]]
name = "foo"
version = "4.39.0.dev0"
source = { editable = "." }
dependencies = [
{ name = "pandas", extra = ["excel", "hdf5"] },
{ name = "pandas", extra = ["html"], marker = "os_name != 'posix'" },
{ name = "pandas", extra = ["output-formatting", "plot"], marker = "os_name == 'posix'" },
]
```
The base package is now implicitly included, as it is in PEP 508.
Fixes #4888
|
||
|---|---|---|
| .. | ||
| pubgrub | ||
| resolution | ||
| resolver | ||
| snapshots | ||
| bare.rs | ||
| candidate_selector.rs | ||
| dependency_mode.rs | ||
| dependency_provider.rs | ||
| error.rs | ||
| exclude_newer.rs | ||
| exclusions.rs | ||
| flat_index.rs | ||
| fork_urls.rs | ||
| lib.rs | ||
| lock.rs | ||
| manifest.rs | ||
| marker.rs | ||
| options.rs | ||
| pins.rs | ||
| preferences.rs | ||
| prerelease_mode.rs | ||
| python_requirement.rs | ||
| redirect.rs | ||
| requires_python.rs | ||
| resolution_mode.rs | ||
| version_map.rs | ||
| yanks.rs | ||