-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Is your feature request related to a problem? Please describe.
Hi @Jake-Shadle.
Could this crate supports some sort of "allow unknown identifier" mode? Given SPDX license list updates frequently. When people want to use new license but this crate hasn't updated. They may see parse error before this crate catches up with SPDX data.
The main issue for Cargo is it becomes code-freeze for at least 6 weeks whenever the Rust nightly version becomes beta. During that time the SPDX data list cannot be updated. However, we want to implement a invalid_spdx_license_expression lint for checking the package.license field in Cargo.toml. Without the relaxing rule, it might be a bit hard for some folk eagerly changing their packages' license (I don't think that is very common but in theory it could happen).
Describe the solution you'd like
A new ParseMode config such as allow_unknown_identifier?
Or have two passes, one for expression, one validate identifiers.
Describe alternatives you've considered
Just don't allow. That is also valid as people can use LicenseRef- or AdditionRef- if they want to refer to a new license before this crate updates.
Additional context
The Cargo team discussed it, and we'd like to see the support happening in spdx crate: rust-lang/cargo#15847 (comment). Thank you.