uv
7b80b181 - uv-pep508: fix disjointness bug

Comment changes are shownComment changes are hidden
Commit
226 days ago
uv-pep508: fix disjointness bug This commit fixes a bug where disjointness checking didn't always satisfy commutativity. And it *should*. The `is_disjoint_commutative` test added here demonstrates a regression test. Before this commit, its second assertion failed. That is, given `m1 = extra == "A" and extra != "B"` and `m2 = extra == "A"`, we were saying that m1 was disjoint with m2 (wrong) but that m2 was not disjoint with m1 (right). It turned out that this was a "simple" matter of not using the correct parent node when calling negation. Likely just a transcription snafu. This bug does not seem restricted in scope to extras, which is how I found it, so it's not clear why we haven't noticed it until now. I noticed it because I was formulating markers in a similar format for resolver forking based on conflicting extras, and this resulted in incorrectly filtering out dependencies due to `is_disjoint` returning a false positive.
Author
Committer
Parents
  • crates/uv-pep508/src/marker
    • File
      algebra.rs
    • File
      tree.rs