]> git.lizzy.rs Git - rust.git/commitdiff
Take build dependencies into account during license checks
authorbjorn3 <bjorn3@users.noreply.github.com>
Mon, 3 May 2021 16:38:52 +0000 (18:38 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Mon, 3 May 2021 16:42:00 +0000 (18:42 +0200)
The comment says that build dependencies shouldn't matter unless they do
some kind of codegen. It is safer to always check it though.

src/tools/tidy/src/deps.rs

index 86231946bb725d8e3011fe897a493134e44a88ed..91008fc9fb7f9b675545a98ac81359b0c6b0f360 100644 (file)
@@ -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);
     }
 }