Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit --exclude to workspace packages #2808

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

tautschnig
Copy link
Member

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.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

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.
@tautschnig tautschnig requested a review from a team as a code owner October 5, 2023 15:41
Copy link
Contributor

@jaisnan jaisnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@adpaco-aws adpaco-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Is this true? I thought that the problem is that --exclude started from a smaller set of packages (i.e., the set that only includes that package), which wouldn't compile in the case we've seen because of features defined in other packages.

The fix makes sense to me, I'm only having problems understanding the reasoning behind it.

kani-driver/src/call_cargo.rs Show resolved Hide resolved
@tautschnig
Copy link
Member Author

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.

Is this true? I thought that the problem is that --exclude started from a smaller set of packages (i.e., the set that only includes that package), which wouldn't compile in the case we've seen because of features defined in other packages.

The fix makes sense to me, I'm only having problems understanding the reasoning behind it.

I admit that I am struggling to decipher https://docs.rs/cargo_metadata/latest/cargo_metadata/struct.Metadata.html#method.workspace_packages -- "Get the workspace packages." is not much more insightful than the name of the method. So even from that documentation I am not really able to tell the difference between metadata.packages and metadata.workspace_packages(). All I can say is that one case that previously caused trouble now works fine.

@adpaco-aws
Copy link
Contributor

Cargo Workspaces are explained here. I wouldn't expect that to be explained in the API since workspaces are the main mechanism in cargo to group up packages which do not necessarily depend among each other, but are simply developed on at the same time.

@tautschnig tautschnig merged commit 534b050 into model-checking:main Oct 5, 2023
13 checks passed
@tautschnig tautschnig deleted the exclude-workspace-only branch October 5, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants