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

Support cargo vendor for a specific workspace package #12307

Open
chbaker0 opened this issue Jun 23, 2023 · 1 comment
Open

Support cargo vendor for a specific workspace package #12307

chbaker0 opened this issue Jun 23, 2023 · 1 comment
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-vendor S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@chbaker0
Copy link

Problem

When run in a workspace, cargo vendor will always vendor all packages for that workspace. This is true even when run from a package subdir (even though the vendor dir will be put in that subdir, confusingly).

It can be useful to vendor the dependencies needed to build some subset of workspace packages.

Example: for projects with their own toolchain build, vendoring the dependencies needed to build the standard library is often desirable. Especially when the standard library is built with an alternative build system. Chromium does this, building the standard library sysroot using its GN build system. cargo vendor will include many unnecessary dependencies right now.

Proposed Solution

Either:

  • cargo vendor in a workspace package will vendor only that packages' dependencies.
  • cargo vendor -p foo will vendor only foo's dependencies. This would match other subcommands' behavior.

Notes

No response

@chbaker0 chbaker0 added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Jun 23, 2023
@weihanglo
Copy link
Member

See also

@weihanglo weihanglo added Command-vendor A-workspaces Area: workspaces S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. and removed S-triage Status: This issue is waiting on initial triage. labels Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-vendor S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

2 participants