-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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`
Description
Describe the problem you are trying to solve
Right now cargo warns if you define both license
and license-file
:
cargo/src/cargo/util/toml/mod.rs
Lines 1439 to 1445 in 72ef2bd
if project.license_file.is_some() && project.license.is_some() { | |
manifest.warnings_mut().add_warning( | |
"only one of `license` or \ | |
`license-file` is necessary" | |
.to_string(), | |
); | |
} |
This is a bit unfortunate as it means any tools that try to collect license files (e.g. for a 3rd-party notices file) have to write their own logic to try and figure out where the license is. But if projects could specify both the SPDX expression in license
to know if a project meets any licensing requirements while also specifying license-file
so it's easy to collect the license text as well would be helpful.
Describe the solution you'd like
- No longer warn when both
license
andlicense-file
are specified. - Update the docs to state that at least_ one of the two fields should be specified, but specifying both is encouraged.
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`