From b280fed5d8450a9b74ada1702d391752b890641b Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 9 Jul 2024 21:10:35 +0200 Subject: [PATCH] Add failing incomplete markers scenarios (#200) We're currently (https://github.com/astral-sh/uv/issues/4732) failing to install `c` from the added scenario: ``` $ echo "fork-incomplete-markers-8137fed5" | uv pip compile --index-url http://127.0.0.1:3141 -p 3.9 --universal - Resolved 4 packages in 38ms # This file was autogenerated by uv via the following command: # uv pip compile -p 3.9 --universal - fork-incomplete-markers-8137fed5==0.0.0 fork-incomplete-markers-a-8137fed5==1.0.0 ; python_version < '3.10' # via fork-incomplete-markers-8137fed5 fork-incomplete-markers-a-8137fed5==2.0.0 ; python_version >= '3.11' # via fork-incomplete-markers-8137fed5 fork-incomplete-markers-b-8137fed5==1.0.0 # via fork-incomplete-markers-8137fed5 ``` This is one particular scenario that we need to test for solving https://github.com/astral-sh/uv/issues/4732 I had to update the lockfile for the recent uv lockfile changes, split out to #199 which removes it from the diff here. --- scenarios/fork/incomplete-markers.toml | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scenarios/fork/incomplete-markers.toml diff --git a/scenarios/fork/incomplete-markers.toml b/scenarios/fork/incomplete-markers.toml new file mode 100644 index 00000000..c870bfc2 --- /dev/null +++ b/scenarios/fork/incomplete-markers.toml @@ -0,0 +1,31 @@ +name = "fork-incomplete-markers" +description = ''' +The root cause the resolver to fork over `a`, but the markers on the variant +of `a` don't cover the entire marker space, they are missing Python 3.10. +Later, we have a dependency this very hole, which we still need to select, +instead of having two forks around but without Python 3.10 and omitting +`c` from the solution. +''' + +[resolver_options] +universal = true + +[expected] +satisfiable = true + +[root] +requires = [ + "a==1; python_version < '3.10'", + "a==2; python_version >= '3.11'", + "b", +] + +[packages.a.versions."1.0.0"] +[packages.a.versions."2.0.0"] + +[packages.b.versions."1.0.0"] +requires = [ + "c; python_version == '3.10'", +] + +[packages.c.versions."1.0.0"]