-
-
Notifications
You must be signed in to change notification settings - Fork 3k
cargo vendor does not include license-file if not in package list #9575
Copy link
Copy link
Closed
Labels
C-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-vendorE-mediumExperience: MediumExperience: MediumS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-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-vendorE-mediumExperience: MediumExperience: MediumS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Describe the problem you are trying to solve
Mono-repos usually have a single
LICENSEfile in the top directory and they reference it from all crates via somelicense-file = "../../LICENSE".At the moment, cargo will not package file from such path.
Since the license file needs to be packaged into the crate for it to be able to be vendored in into other projects.
We encountered that problem when trying to vendor in ICU4X (rust mono repo) into Firefox.
In order to comply with the vendor policy of Mozilla, we need to duplicate the
LICENSEfile to each component of the mono repo and introduce a maintenance script to ensure the licenses stay in sync.See the issue, and the PR.
Describe the solution you'd like
It would help such projects if files referenced in
Cargo.tomlwere packaged even if they live in the parent directory to the crate root.The file could be copied to the root directory of the package.
Notes
If that's impossible, I'd at least suggest displaying a warning that cargo skips packaging of the file.