uv/crates/uv-resolver/src
Andrew Gallant 563507edba uv-resolver: add support for incomplete markers
In some cases, it's possible for the marker expressions on conflicting
dependency specification to be disjoint but *incomplete*. That is, if
one unions the disjoint markers, the result is not the complete set of
marker environments possible. There may be some "gap" of marker
environments not covered by the markers.

This is a problem in practice because, before this commit, we only
created forks in the resolver for specific marker expressions. So if a
dependency happened to fall in a "gap," our resolver would never see it.

This commit fixes this by adding a new split covering the negation of
the union of all marker expressions in a set of forks for a specific
package.

Originally, I had planned on only creating this split when it was known
that the gap actually existed. That is, when the negation of the marker
expressions did *not* correspond to the empty set. After a lot of
thought, unfortunately, this (I believe) effectively boils down to 3SAT,
which is NP-complete.

Instead, what we do here is *always* create an extra split unless we can
definitively tell that it is empty. We look for a few cases, but
otherwise throw our hands up and potentially do wasted work.

This also updates the lock scenario tests to reflect the actual bug fix
here.
2024-07-15 10:09:01 -07:00
..
pubgrub Remove special casing from no solution error (#5067) 2024-07-15 17:43:35 +02:00
resolution Filter out markers based on Python requirement (#4912) 2024-07-09 09:15:58 -07:00
resolver uv-resolver: add support for incomplete markers 2024-07-15 10:09:01 -07:00
snapshots Avoid reparsing wheel URLs (#4947) 2024-07-10 05:16:30 -04:00
bare.rs Add support for parsing unnamed URL requirements (#2567) 2024-03-21 03:28:58 +00:00
candidate_selector.rs uv-distribution: include all wheels in distribution types (#3595) 2024-05-15 15:07:28 -04:00
dependency_mode.rs Rename to uv (#1302) 2024-02-15 11:19:46 -06:00
dependency_provider.rs Update pubgrub to new add_incompatibility_from_dependencies (#4062) 2024-06-05 20:46:00 +02:00
error.rs Remove special casing from no solution error (#5067) 2024-07-15 17:43:35 +02:00
exclude_newer.rs Improve JSON Schema and add export script (#3461) 2024-05-08 16:15:16 +00:00
exclusions.rs Allow constraints to be provided in --upgrade-package (#4952) 2024-07-09 20:09:13 -07:00
flat_index.rs Remove useless #[allow(clippy::too_many_arguments)] (#4529) 2024-06-25 19:09:59 +00:00
fork_urls.rs Support conflicting URL in separate forks (#4435) 2024-06-26 13:58:23 +02:00
lib.rs Narrow requires-python requirement in resolver forks (#4707) 2024-07-02 12:23:38 +00:00
lock.rs Improve error message when package has no installation candidates (#5010) 2024-07-15 00:00:40 +00:00
manifest.rs Apply extra to overrides and constraints (#4829) 2024-07-09 20:37:24 +02:00
marker.rs uv-resolver: add support for incomplete markers 2024-07-15 10:09:01 -07:00
options.rs Implement --index-strategy unsafe-best-match (#3138) 2024-04-27 01:24:54 +00:00
pins.rs uv-resolver: implement merging of forked resolutions 2024-05-30 14:23:14 -04:00
preferences.rs Set fork solution as preference when resolving (#4662) 2024-07-01 08:25:40 -04:00
prerelease_mode.rs Add support for tool.uv into distribution building (#3904) 2024-05-31 02:42:03 +00:00
python_requirement.rs uv-resolver: partially revert Requires-Python version narrowing 2024-07-08 09:56:59 -07:00
redirect.rs Preserve fragments when applying verbatim redirects (#4038) 2024-06-05 03:53:23 +00:00
requires_python.rs Filter out markers based on Python requirement (#4912) 2024-07-09 09:15:58 -07:00
resolution_mode.rs Apply extra to overrides and constraints (#4829) 2024-07-09 20:37:24 +02:00
version_map.rs Move Requires-Python incompatibilities out of version map (#4705) 2024-07-02 08:15:39 -04:00
yanks.rs Use Preferences struct in Manifest API (#4496) 2024-06-24 23:28:55 +00:00