uv/crates/uv-resolver/src
konsti 91653f5fee
Avoid invalid simplification with conflict markers (#15041)
Previously, `simplify_conflict_markers` assumed that it can remove all
conflict set together, when we need to look at each conflict set
individually. Specifically, `(platform_machine == 'x86_64' and extra ==
'extra-5-foo-b') or extra == 'extra-5-foo-a'` can't be reduced
`platform_machine == 'x86_64'` only because it reduces to true when both
conflict extras are activated.

This case applied in https://github.com/astral-sh/uv/issues/14805, where
a jax 0.5.3 version was used for `platform_machine != 'aarch64' or
sys_platform != 'linux'` and the conflict extra `cu128`, but jax 0.7.0
for the conflict extra `cpu`.

Only removing the faulty inference regresses lockfiles to much more
verbose markers. To balance the much more conservative inference, I
added `unify_inference_sets` to simplify cases where all conflict
branches reduce to the same marker.

This still regresses some markers. For example `sys_platform == 'win32'`
regresses to `sys_platform == 'win32' or (extra == 'extra-3-pkg-x1' and
extra == 'extra-3-pkg-x2')` in `extra_inferences`, even through x1 and
x2 conflict and the second conjunction could be simplified away.

Fixes https://github.com/astral-sh/uv/issues/14805
2025-08-06 09:26:26 +00:00
..
lock additional use of Self, remove * and & where not needed (#15091) 2025-08-05 15:19:56 -05:00
pubgrub Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
resolution additional use of Self, remove * and & where not needed (#15091) 2025-08-05 15:19:56 -05:00
resolver Avoid invalid simplification with conflict markers (#15041) 2025-08-06 09:26:26 +00:00
candidate_selector.rs Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
dependency_mode.rs Store resolution options in lockfile (#5264) 2024-07-22 08:28:22 -04:00
dependency_provider.rs All (virtual) packages must have a priority (#10853) 2025-01-23 16:09:47 +00:00
error.rs Add derivation chains for dependency errors (#14824) 2025-07-22 15:08:33 -04:00
exclude_newer.rs Add `exclude-newer-package` (#14489) 2025-07-29 17:00:25 -05:00
exclusions.rs Always reinstall local source trees passed to `uv pip install` (#12176) 2025-03-17 21:12:21 +00:00
flat_index.rs Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00
fork_indexes.rs Use parsed URLs for conflicting URL error message (#14380) 2025-07-01 08:18:01 -04:00
fork_strategy.rs Introduce a `--fork-strategy` preference mode (#9868) 2024-12-13 16:05:07 -05:00
fork_urls.rs Use parsed URLs for conflicting URL error message (#14380) 2025-07-01 08:18:01 -04:00
graph_ops.rs Avoid invalid simplification with conflict markers (#15041) 2025-08-06 09:26:26 +00:00
lib.rs Add `exclude-newer-package` (#14489) 2025-07-29 17:00:25 -05:00
manifest.rs Move lowered requirement source type out of `uv-pypi-types` (#12356) 2025-03-20 21:16:12 -04:00
marker.rs Introduce a generic type for list operations (#14792) 2025-07-21 18:21:46 +02:00
options.rs Add `exclude-newer-package` (#14489) 2025-07-29 17:00:25 -05:00
pins.rs Improve file pinning comments (#10387) 2025-01-08 11:42:25 +00:00
preferences.rs Fix handling of pre-releases in preferences (#14498) 2025-07-07 20:10:35 -05:00
prerelease.rs Make the use of `Self` consistent. (#15074) 2025-08-05 20:17:12 +01:00
python_requirement.rs Add `[tool.uv.dependency-groups].mygroup.requires-python` (#13735) 2025-06-13 22:04:13 +00:00
redirect.rs Add `DisplaySafeUrl` newtype to prevent leaking of credentials by default (#13560) 2025-05-27 00:05:30 +02:00
resolution_mode.rs Respect fork markers in `--resolution-mode=lowest-direct` (#8839) 2024-11-05 21:09:38 +00:00
universal_marker.rs Avoid invalid simplification with conflict markers (#15041) 2025-08-06 09:26:26 +00:00
version_map.rs Add `exclude-newer-package` (#14489) 2025-07-29 17:00:25 -05:00
yanks.rs Move lowered requirement source type out of `uv-pypi-types` (#12356) 2025-03-20 21:16:12 -04:00