Repository navigation
Conversation
uv test inventory changesThis PR changes the tests when compared with the
|
Author
|
Seems this was fixed in uv 0.13.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With many conflicting extras, environment-dependent edges get a marker with a clause for every pair of extras. Converting these markers to DNF dominated
uv lockanduv export, because simplification compared every pair of clauses term by term.Simplification for expressions with 8 or more clauses, terms are interned and clauses compared as bit sets. For each clause, every other clause is compared once to find the terms it is missing. A term can only be removed using a clause whose missing terms are all negations of that term, so clauses missing more terms than the most negations any term has (in practice, one) are discarded up front. The remaining candidates are checked for each term and updated as terms are removed. The result is identical to the existing algorithm, which still handles smaller expressions.
Closes #21954
Closes #18317
Related:
uv addhangs forever for complex pyproject #16779 and Avoid conflict set combinatorial explosion #19538: an earlier hang with large conflict sets, fixed in a different code path.This pr take some parts from:
Test Plan
Timings with the
profilingprofile, offline with a warm cache:uv lockuv lockuv lockwith its existing lockfileuv export --frozenmteb has 83 extras, 46 of them in one conflict group. The lockfiles and
uv exportoutput are byte-identical to those produced with the existing simplification.Follow-up
Time and lockfile size still grow with the number of conflicting extras, because
UniversalMarker::imbiberewrites environment-dependent markers asconflicts implies marker, which adds every forbidden pair of extras. Keeping the original marker when the implied form doesn't simplify it would remove those clauses at the source and address #18317, but it changes lockfile output.