Skip to content

Commit

Permalink
fix: solver crash when using unrelated locked record (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra authored Nov 5, 2024
1 parent b9e54f0 commit 7b05fdf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/rattler_solve/src/resolvo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ impl<'a> CondaDependencyProvider<'a> {
&record.channel,
);
}

candidates.hint_dependencies_available.push(solvable_id);
}
}

Expand All @@ -395,6 +393,11 @@ impl<'a> CondaDependencyProvider<'a> {
candidates.locked = Some(solvable);
}

// The dependencies for all candidates are always available.
for candidates in records.values_mut() {
candidates.hint_dependencies_available = candidates.candidates.clone();
}

Ok(Self {
pool,
records,
Expand Down

0 comments on commit 7b05fdf

Please sign in to comment.