Skip to content

Commit

Permalink
Don't warn if packages not listed in cargo metadata are coming from
Browse files Browse the repository at this point in the history
Rust sysroot
  • Loading branch information
messense committed Jun 19, 2022
1 parent 57f3e0f commit 88c7355
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,17 @@ fn compile_target(
let crate_name = match package_in_metadata {
Some(package) => &package.name,
None => {
// This is a spurious error I don't really understand
println!(
"⚠️ Warning: The package {} wasn't listed in `cargo metadata`",
artifact.package_id
);
let package_id = &artifact.package_id;
// Ignore the package if it's coming from Rust sysroot when compiling with `-Zbuild-std`
if !package_id.repr.contains("rustup")
&& !package_id.repr.contains("rustlib")
{
// This is a spurious error I don't really understand
println!(
"⚠️ Warning: The package {} wasn't listed in `cargo metadata`",
package_id
);
}
continue;
}
};
Expand Down

0 comments on commit 88c7355

Please sign in to comment.