Re: Correct handling of snippets
Max Mehl
~ Gary O'Neall [2020-07-28 02:41 +0200]:
Thank you! I've opened a Pull Request, but it only touches Annex E. I1. We would both be fine with REUSE-Snippet-Begin, REUSE-SnippetBegin,[G.O.] I personally would like to include this in the SPDX spec - we just need a volunteer to create an issue or (better yet) a pull request to update the Annex E Using SPDX license list short identifiers in source files (https://github.com/spdx/spdx-spec/blob/development/v2.2.1/chapters/using-SPDX-short-identifiers-in-source-files.md#annex-e-using-spdx-license-list-short-identifiers-in-source-files-informative). I would offer help on this, but I'm pretty busy with this year's Google Summer of Code and won't be able to help much for the next couple of months. wondered whether we also have to clarify other snippet specifics in snippet-information.md subsequently, but see more here: https://github.com/spdx/spdx-spec/pull/464 For unaware tools, perhaps. They would detect that there are multiple3. For license, we would prefer SPDX-License-Identifier. This is the tag[G.O] Is there a possible ambiguity of an SPDX-License-Identifier is associated with a file or a snippet? License-Identifiers (is this legal in SPDX?), but this way at least they would know about the potentially differently licensed code in the file. For tools, it should not be hard to detect whether License-Identifier is inside a snippet or not. In my PR's description I explain why "Snippet-License-Identifier" might be even more confusing to users. Great to know we're on the same page here then ;)Another question was raised regarding nesting of snippets, so the strange case[G.O.] To be honest, I haven't considered the nesting of Snippets. Un-nested snippets are complex enough ;) In an SPDX document nesting is allowed since they are expressed with byte ranges and there is no rule to prevent nesting or even overlapping snippets. When marking snippets inline, it is a bit more challenging. I would definitely disallow overlapping snippets (e.g. Snippet A is lines 1 through 20 and Snippet B is lines 10 through 30). Nesting may be useful, however but it would significantly complicate the tooling. I don't feel strongly, but I tend to agree with the proposal that nesting not be allowed. Best, Max -- Max Mehl - Programme Manager - Free Software Foundation Europe Contact and information: https://fsfe.org/about/mehl | @mxmehl Become a supporter of software freedom: https://fsfe.org/join |
|