cps-org / cps

Common Package Specification — A cross-tool mechanism for locating software dependencies
https://cps-org.github.io/cps/
Other
99 stars 8 forks source link

Use SPDX expressions for License and Default-License #22

Closed dcbaker closed 6 months ago

dcbaker commented 10 months ago

Currently CPS specifies a custom recursive array based syntax for licenses, but uses SPDX license representations. Since the time this was originally specified, SPDX has become an ISO standard, and continued to gain traction in the Open Source world. Apart from being a standard, and more likely to be directly consumable by external tools, it simplifies a build system that wishes to build it's own SPDX license information, by simply returning (ExpressionA) AND (ExpressionB).

Fixes #6

mwoehlke commented 6 months ago

To be clear, we're requiring anyone that actually needs to parse license information to implement a lexer to do so? We're okay with that?

autoantwort commented 6 months ago

I am okay with that. Most tools can simply interpret it as string and tools that want to do fancy stuff with licenses need to parse spdx license expressions. vcpkg for example already can do this and there are existing libraries for js, java, python or go.

dcbaker commented 6 months ago

I took your inline suggestions. I also squashed the last two commits into one, and dropped the commit that fixes the names of the GPL licenses.

mwoehlke commented 6 months ago

I also squashed the last two commits into one, and dropped the commit that fixes the names of the GPL licenses.

Okay, the current split is fine. Thank you!

BTW, although the build is "succeeding", there's a warning:

schema-supplement.rst:36: WARNING: undefined label: 'license expression'

(See inline comment with suggested fix.)

dcbaker commented 6 months ago

Oops, I replaced the wrong link with your suggestion! fixed now.