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

Don't warn when both license and license-file are specified #9908

Closed
brettcannon opened this issue Sep 13, 2021 · 2 comments
Closed

Don't warn when both license and license-file are specified #9908

brettcannon opened this issue Sep 13, 2021 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@brettcannon
Copy link

Describe the problem you are trying to solve

Right now cargo warns if you define both license and license-file:

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

  1. No longer warn when both license and license-file are specified.
  2. Update the docs to state that at least_ one of the two fields should be specified, but specifying both is encouraged.
@brettcannon brettcannon added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Sep 13, 2021
@Eh2406
Copy link
Contributor

Eh2406 commented Oct 12, 2021

There is some previous discussion at #8537

@brettcannon brettcannon changed the title Don't warning when both license and license-file are specified Don't warn when both license and license-file are specified Oct 17, 2021
@brettcannon
Copy link
Author

Based on the discussion that @Eh2406 linked to, I think this will eventually get rejected, so I'm going to preemptively close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants