please
please copied to clipboard
Licences are now SPDX expressions
We've discussed this quite a bit internally, it has several advantages over the current setup:
- The list of licences is not obvious that it is OR. (It is documented and always has been, but this is often gotten wrong regardless)
- We end up having SPDX-like sub-expressions anyway like
MIT AND Zlib, but these have to be accepted as though they were a licence in their own right; fortunately they aren't common but we shouldn't have to accept every permutation separately. - We align better with the relevant standard.
I am slightly worried that the SPDX library is stricter about licence identifiers. I've had to adjust the behaviour a bit so it will pass licences that are not on the list as-is, but they do still need to be structurally valid (i.e. MPL-2.0 not The Mozilla Public License, version 2.0 (with Chocolate Coating)). I don't particularly want to maintain a completely separate implementation internally with the old list-based thing though.
This also deprecates the add_licence and get_licences builtins in favour of new ones, get_licence and set_licence which operate just on a single string.