Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/internal/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ impl<DP: DependencyProvider> State<DP> {
}

/// Add an incompatibility to the state.
#[cold]
pub(crate) fn add_incompatibility_from_dependencies(
&mut self,
package: Id<DP::P>,
Expand All @@ -105,6 +106,7 @@ impl<DP: DependencyProvider> State<DP> {

/// Unit propagation is the core mechanism of the solving algorithm.
/// CF <https://github.com/dart-lang/pub/blob/master/doc/solver.md#unit-propagation>
#[cold]
pub(crate) fn unit_propagation(
&mut self,
package: Id<DP::P>,
Expand Down Expand Up @@ -187,6 +189,7 @@ impl<DP: DependencyProvider> State<DP> {
/// Return the root cause or the terminal incompatibility.
/// CF <https://github.com/dart-lang/pub/blob/master/doc/solver.md#unit-propagation>
#[allow(clippy::type_complexity)]
#[cold]
fn conflict_resolution(
&mut self,
incompatibility: IncompDpId<DP>,
Expand Down
1 change: 1 addition & 0 deletions src/internal/partial_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
}
}

#[cold]
pub(crate) fn pick_highest_priority_pkg(
&mut self,
prioritizer: impl Fn(Id<DP::P>, &DP::VS) -> DP::Priority,
Expand Down
1 change: 1 addition & 0 deletions src/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ use crate::{DependencyConstraints, Map, Package, PubGrubError, SelectedDependenc

/// Main function of the library.
/// Finds a set of packages satisfying dependency bounds for a given package + version pair.
#[cold]
pub fn resolve<DP: DependencyProvider>(
dependency_provider: &DP,
package: DP::P,
Expand Down