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

Nontrivial license expressions not supported #82

Open
jwodder opened this issue Oct 26, 2023 · 0 comments
Open

Nontrivial license expressions not supported #82

jwodder opened this issue Oct 26, 2023 · 0 comments

Comments

@jwodder
Copy link

jwodder commented Oct 26, 2023

Currently, cargo-lichking parses license expressions by just splitting them apart on slashes and "OR"; however, SPDX license expressions can also contain the operators "AND" & "WITH" and use parentheses for grouping.

For example, the license expression for unicode-ident (a dependency of the ubiquitous syn) is "(MIT OR Apache-2.0) AND Unicode-DFS-2016". When cargo-lichking tries to find the licenses for this package, the following errors are output:

 ERROR cargo_lichking::bundle > unicode-ident has no candidate texts for license (MIT in /Users/jwodder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12
 ERROR cargo_lichking::bundle > unicode-ident has no candidate texts for license Apache-2.0) AND Unicode-DFS-2016 in /Users/jwodder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.12

and no license files are found, even though unicode-ident's source contains LICENSE-APACHE, LICENSE-MIT, and LICENSE-UNICODE files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant