cargo-lichking
cargo-lichking copied to clipboard
Nontrivial license expressions not supported
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.