Skip to content

Commit

Permalink
Limit --exclude to workspace packages
Browse files Browse the repository at this point in the history
Previously, --exclude would start from the set of all packages
referenced in a workspace, i.e., the workspace's packages plus any
dependencies. Without --exclude, we would at most look at all the
workspace's packages, so --exclude would result in possibly verifying a
larger set of packages.
  • Loading branch information
tautschnig committed Oct 5, 2023
1 parent 6d9575e commit 309c2e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kani-driver/src/call_cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ fn packages_to_verify<'b>(
.collect()
} else if !args.cargo.exclude.is_empty() {
validate_package_names(&args.cargo.exclude, &metadata.packages)?;
metadata.packages.iter().filter(|pkg| !args.cargo.exclude.contains(&pkg.name)).collect()
metadata
.workspace_packages()
.into_iter()
.filter(|pkg| !args.cargo.exclude.contains(&pkg.name))
.collect()
} else {
match (args.cargo.workspace, metadata.root_package()) {
(true, _) | (_, None) => metadata.workspace_packages(),
Expand Down

0 comments on commit 309c2e6

Please sign in to comment.