Files
astral-sh-uv/test/scenarios/fork/remaining-universe-partitioning.toml
T
Zanie Blue b4d32e4356 Vendor packse scenarios and serve them from an in-memory index (#18084)
This makes it easier for us to add resolver scenarios by

1. Rewriting the scenario package generation in Rust
2. Serving scenario packages from memory in a wiremock index
3. Rewriting the scenario test case generation in Rust
4. Dropping all dependencies on packse / the packse index

---------

Co-authored-by: Codex <noreply@openai.com>
2026-06-02 09:25:29 -05:00

48 lines
1.7 KiB
TOML

name = "fork-remaining-universe-partitioning"
description = '''
This scenario tries to check that the "remaining universe" handling in
the universal resolver is correct. Namely, whenever we create forks
from disjoint markers that don't union to the universe, we need to
create *another* fork corresponding to the difference between the
universe and the union of the forks.
But when we do this, that remaining universe fork needs to be created
like any other fork: it should start copying whatever set of forks
existed by the time we got to this point, intersecting the markers with
the markers describing the remaining universe and then filtering out
any dependencies that are disjoint with the resulting markers.
This test exercises that logic by ensuring that a package `z` in the
remaining universe is excluded based on the combination of markers
from a parent fork. That is, if the remaining universe fork does not
pick up the markers from the parent forks, then `z` would be included
because the remaining universe for _just_ the `b` dependencies of `a`
is `os_name != 'linux' and os_name != 'darwin'`, which is satisfied by
`z`'s marker of `sys_platform == 'windows'`. However, `a 1.0.0` is only
selected in the context of `a < 2 ; sys_platform == 'illumos'`, so `z`
should never appear in the resolution.
'''
[resolver_options]
universal = true
[expected]
satisfiable = true
[root]
requires = [
"a>=2 ; sys_platform == 'windows'",
"a<2 ; sys_platform == 'illumos'",
]
[packages.z.versions."1.0.0"]
[packages.a.versions."1.0.0"]
requires = [
"b>=2 ; os_name == 'linux'",
"b<2 ; os_name == 'darwin'",
"z ; sys_platform == 'windows'",
]
[packages.a.versions."2.0.0"]
[packages.b.versions."1.0.0"]
[packages.b.versions."2.0.0"]