Skip to content

Commit

Permalink
Take build dependencies into account during license checks
Browse files Browse the repository at this point in the history
The comment says that build dependencies shouldn't matter unless they do
some kind of codegen. It is safer to always check it though.
  • Loading branch information
bjorn3 committed May 3, 2021
1 parent 2fa18b8 commit 5db01aa
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,7 @@ fn normal_deps_of_r<'a>(
.iter()
.find(|n| &n.id == pkg_id)
.unwrap_or_else(|| panic!("could not find `{}` in resolve", pkg_id));
// Don't care about dev-dependencies.
// Build dependencies *shouldn't* matter unless they do some kind of
// codegen. For now we'll assume they don't.
let deps = node.deps.iter().filter(|node_dep| {
node_dep
.dep_kinds
.iter()
.any(|kind_info| kind_info.kind == cargo_metadata::DependencyKind::Normal)
});
for dep in deps {
for dep in &node.deps {
normal_deps_of_r(resolve, &dep.pkg, result);
}
}

0 comments on commit 5db01aa

Please sign in to comment.