mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Avoid infinite loop in uv export
with conflicts (#12726)
## Summary Closes https://github.com/astral-sh/uv/issues/12695. Closes https://github.com/astral-sh/uv/issues/12719.
This commit is contained in:
parent
1cca93c099
commit
a0f5c7250b
3 changed files with 269 additions and 18 deletions
|
@ -483,11 +483,12 @@ fn conflict_marker_reachability<'lock>(
|
|||
|
||||
// Combine the inferred marker with the existing marker on the node.
|
||||
match reachability.entry(child_edge.target()) {
|
||||
Entry::Occupied(existing) => {
|
||||
Entry::Occupied(mut existing) => {
|
||||
// If the marker is a subset of the existing marker (A ⊆ B exactly if
|
||||
// A ∪ B = A), updating the child wouldn't change child's marker.
|
||||
parent_marker.or(*existing.get());
|
||||
if parent_marker != *existing.get() {
|
||||
existing.insert(parent_marker);
|
||||
queue.push(child_edge.target());
|
||||
}
|
||||
}
|
||||
|
@ -496,8 +497,6 @@ fn conflict_marker_reachability<'lock>(
|
|||
queue.push(child_edge.target());
|
||||
}
|
||||
}
|
||||
|
||||
queue.push(child_edge.target());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue