-
Notifications
You must be signed in to change notification settings - Fork 140
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
Clarify use of newlines for license expressions used in source files #45
Comments
On Thu, Oct 12, 2017 at 09:53:38PM +0000, goneall wrote:
The SPDX License Identifier syntax may consist of a single license
(represented by a short identifier from the SPDX license list) or a
compound set of licenses (represented by joining together multiple
licenses using the license expression syntax which is enclosed in
parenthesis and may span multiple lines).
I'm in favor of adding “may span multiple lines”, although I think we
may want to put limitations on that along the lines of [1,2]. If we
cite RFC 5322 for the folding whitespace spec (or a subset of it), we
can leverage many existing parsers and writers while also relaxing the
current wrapping-paren restriction.
And you can have spaces in a license expression with a single license
and exception: ‘A WITH B’. I think it's best to replace “compound set
of licenses” with the ABNF rule it represents (and have some work in
progress to set this up in #37, although we can start using ABNF rule
names more aggressively without that PR).
Cross linking the list thread [3].
[1]: https://tools.ietf.org/html/rfc5322#section-2.2.3
[2]: https://tools.ietf.org/html/rfc5322#section-3.2.2
[3]: https://lists.spdx.org/pipermail/spdx-legal/2017-October/002274.html
Subject: Re: Spec recommendation for paren encapsulation? (was:
signifigance of nested parenthesis with only ORs?)
Date: Thu, 12 Oct 2017 12:56:13 -0700
Message-ID: <20171012195613.GH11004@valgrind.tremily.us>
|
The motivation for relaxing the paren requirement is to allow for wild-caught declarations like this:
|
For simplicity, we should state than an expression is always a single line IMHO |
@pombredanne +1 One of the big gains from using short-form IDs in source code is making license info obtainable, to grep for "SPDX-License-Identifier:". That assumes that the license IDs are on the same line, and becomes messier or less effective if it can spread over multiple lines. |
This changes appendices IV and V to prohibit multiple lines (e.g., line breaks) in a single license expression. This is applicable for both tag-value SPDX documents as well as short-form license identifier expressions in source code. Because multiple lines are no longer permitted, this also makes the outer set of parentheses optional, rather than mandatory, for license expressions with more than one license identifier. Fixes spdx#44 Fixes spdx#45 Fixes spdx#52 Signed-off-by: Steve Winslow <steve@swinslow.net>
This changes appendices IV and V to prohibit multiple lines (e.g., line breaks) in a single license expression. This is applicable for both tag-value SPDX documents as well as short-form license identifier expressions in source code. Because multiple lines are no longer permitted, this also makes the outer set of parentheses optional, rather than mandatory, for license expressions with more than one license identifier. Fixes #44 Fixes #45 Fixes #52 Signed-off-by: Steve Winslow <steve@swinslow.net>
In Appendix V, it is not clear if multiple lines are to be used for compound set of licenses. Suggest changing the following statement:
The SPDX License Identifier syntax may consist of a single license (represented by a short identifier from the SPDX license list) or a compound set of licenses (represented by joining together multiple licenses using the license expression syntax).
to:
The SPDX License Identifier syntax may consist of a single license (represented by a short identifier from the SPDX license list) or a compound set of licenses (represented by joining together multiple licenses using the license expression syntax which is enclosed in parenthesis and may span multiple lines).
The text was updated successfully, but these errors were encountered: