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

Error out in case of adding members of Cargo virtual workspace individually in dist-workspace.toml #1550

Open
alilleybrinker opened this issue Nov 13, 2024 · 1 comment

Comments

@alilleybrinker
Copy link
Contributor

See: https://github.com/mitre/hipcheck/actions/runs/11751317704/job/32741130807

In this GitHub Actions error, you can see that each crate in the Cargo virtual workspace is duplicated 14 times. This is because the workspace.members field of the dist-workspace.toml file added each dist-able member of the Cargo virtual workspace individually. When this is processed to identify all distable packages, each call to crate::rust::get_workspace actually identifies all packages in the overall Cargo virtual workspace, and this is run 14 times (one for each entry in workspace.members, resulting in the duplication.

I think the right course of action would be to identify when packages being specified as Dist workspace members are in a virtual Cargo workspace, and producing an error saying to instead specify the Cargo virtual workspace root itself.

@duckinator
Copy link
Contributor

Thank you for digging into this! I agree, telling people to use the virtual workspace itself makes sense.

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

No branches or pull requests

2 participants