Skip to content

Commit

Permalink
small clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Nov 14, 2024
1 parent a4b4eee commit 855bd54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ pub fn sort_build_outputs_topologically(
let output_idx = *name_to_index
.get(output.name())
.expect("We just inserted it");
for dep in output.recipe.requirements().all() {
for dep in output.recipe.requirements().run_build_host() {
let dep_name = match dep {
Dependency::Spec(spec) => spec
.name
Expand All @@ -738,6 +738,7 @@ pub fn sort_build_outputs_topologically(
Dependency::PinSubpackage(pin) => pin.pin_value().name.clone(),
Dependency::PinCompatible(pin) => pin.pin_value().name.clone(),
};

if let Some(&dep_idx) = name_to_index.get(&dep_name) {
// do not point to self (circular dependency) - this can happen with
// pin_subpackage in run_exports, for example.
Expand Down
3 changes: 1 addition & 2 deletions src/recipe/parser/requirements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ impl Requirements {
}

/// Get all requirements in one iterator.
pub fn all(&self) -> impl Iterator<Item = &Dependency> {
pub fn run_build_host(&self) -> impl Iterator<Item = &Dependency> {
self.build
.iter()
.chain(self.host.iter())
.chain(self.run.iter())
// .chain(self.run_constraints.iter())
}

/// Check if all requirements are empty.
Expand Down

0 comments on commit 855bd54

Please sign in to comment.