-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-workspacesArea: workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-vendorS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
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 onlyfoo
's dependencies. This would match other subcommands' behavior.
Notes
No response
tanyav2, kbknapp, MathisWellmann, vegerot, miikka and 8 moreRandyMcMillan
Metadata
Metadata
Assignees
Labels
A-workspacesArea: workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-vendorS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
weihanglo commentedon Jul 18, 2023
See also