Skip to content

Commit

Permalink
fix: log found derivations in the collected_paths set
Browse files Browse the repository at this point in the history
This avoids duplicate entries
  • Loading branch information
Erin van der Veen committed Jun 13, 2024
1 parent ddfa597 commit b3ba82e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,16 @@ pub fn nixtract(
derivations.extend(attribute_path.found_drvs);
}

for found_drv in derivations.clone() {
match found_drv.output_path {
None => log::warn!("Found a derivation without an output_path: {:?}", found_drv),
Some(output_path) => {
let mut collected_paths = collected_paths.lock().unwrap();
collected_paths.insert(output_path);
}
}
}

// Spawn a new rayon thread to call process on every foundDrv
rayon::spawn(move || {
derivations.into_par_iter().for_each(|found_drv| {
Expand Down

0 comments on commit b3ba82e

Please sign in to comment.