-
Notifications
You must be signed in to change notification settings - Fork 628
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 parentheses in license
fields
#2595
Comments
We use the license-exprs crate, so parentheses support would need to be implemented there. Here is the issue for implementing parentheses. Also note you can specify a |
I filed this in anticipation of It appears that This issue isn't specific to |
I'll add: a major recurring problem that LICENSE files face is that automated license checking tooling (which exists in basically every large project, including I think Rust itself!) bails on them, which tends to require additional process (allowlisting, also often checking with a lawyer). I suspect it should not be hard to add support to the license-exprs crate, it uses a nestable enum to represent license requirements. I might take a crack at it. I took a quick glance at |
I didn't test |
the commit message in rust-lang/cargo@7dee65f might be relevant to this discussion. the deprecation of the https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields states that:
but it looks like https://github.com/EmbarkStudios/spdx/ is currently on v3.14 of the license list, so that would be a behavior change for crates.io. I would assume that this should be fine for the majority of cases though. Does anyone have an objection on why we shouldn't update that license list? Regarding the example license expression above, the I think the way forward would be:
|
license
fields
utils/license: Add support for parentheses <img width="317" alt="Bildschirmfoto 2021-12-12 um 18 29 16" src="https://user-images.githubusercontent.com/141300/145722892-c331d94c-d22e-4fcb-a541-7a433724138f.png"> related to #2595
Hey, author of spdx crate here, I noticed this issue and felt I could clarify some things.
|
thank you for the clarification, @Jake-Shadle :) |
FWIW I've opened EmbarkStudios/spdx#50 to potentially allow us to keep the |
Add tests for license expression validation related to: - #2595
#4293 switches crates.io from |
I've just published https://crates.io/crates/spdx/0.8.0 which contains the improvements made by @Turbo87, let me know if there are any other changes that need to be made to support the crates.io use case! |
The documentation for the
Cargo.toml
license
field says: "Parentheses are not currently supported."Please add support for paretheses. The use case is to combine the usual Rust dual license with a permissive license used for some part of the crate originating elsewhere. E.g. "(Apache-2.0 OR MIT) AND BSD-3-Clause".
The text was updated successfully, but these errors were encountered: