On Thu, May 12, 2016 at 6:06 PM, Wheeler, David A <[email protected]> wrote: > Philippe Ombredanne [mailto:[email protected]]> > >>Could this be simplified? >> I can see two use cases: >> 1. at the file or directory level, this is unlikely needed: just provide >> theexpression that applies there only e.g. to a doc or source directory in >> an SPDX doc or a simple expression. > > There's no "there" to be in. People are trying to fill in a form, with a > single string expressing the SPDX license expression. > >> 2. for a top level package, would a notion of "licensing scope" be simpler >> than a full conditional construct? > e.g. something like: >> >> scope:doc GFDL and MIT >> scope:tools GPL-2.0+ >> scope:library LGPL-2.1+ > > No, I think that's much worse. > > The phrase "scope:doc" is not shorter nor less complicated than "IF DOC" or > "IF DOCUMENTATION". This alternative seems to imply semantically-meaningful > newlines, which is *NOT* a feature of the current syntax, so this would be a > *MUCH* more drastic change. It also is too limited for future expansion - > what if you want to handle nesting later? How do you handle the "other than > this scope" situation? > > I think "IF..." is widely understood. Lots of legal texts use them, and > programmers know what they are :-). If you want to use the keyword "DOC" > instead of "DOCUMENTATION", that's fine. > > If you want to prefer lower case for non-license keywords, that's fine. > Having all keywords in lower case might be a good idea anyway, to help make > the keywords more distinct. But that's a different question.
Sorry if I was not clear there: I am not proposing any expression syntax change, rather I suggest to look at this problem differently. You wrote: > > In the Linux Foundation CII “best practices” badge effort I’m > > noticing an interesting problem. Some projects have *different* license > > situations for their source code and documentation, but there’s no > > simple way to express that using SPDX License expressions. > > [...] People are trying to fill in a form, with a single string expressing > > the SPDX license expression. If I reformulate: In an application that stores an SPDX license expression as a single string for a top level project/package, it is not possible to state that some licenses apply only to a subset of files/directories and not to the whole project/package. As a solution, you propose to change the SPDX License expression syntax to support this use case and this application design and underlying data model. I suggest instead to change this application design and data model to track several license expressions, one for each of your "keywords". For instance, by storing a list of expressions and what they apply to or by breaking down top level packages in sub-packages each with their own expressions. Or by storing a multiline string, where each line is an expression possibly prefixed by some symbol describing what this expression applies to. And define the convention of what this prefix means in this application. Whatever would work there. That said, packing in an single expression multiple sub-expressions and state which files/directory this licensing applies to is a fine goal. Possibly useful. But it eventually means summarizing several SPDX doc(s) data points in a single line: not something to take on lightly. Verbosity matters. Simplicity too. IF/THEN/ELSE is both verbose and complex IMHO. Could there be a simpler way to capture just this notion of applicability or scope of the licensing? Where would the definition of the scopes (keywords) be spec'ed? Universally? or customizable? How? How would a keyword map to actual files? And how would this map to the rest of the SPDX model? -- Cordially Philippe Ombredanne _______________________________________________ Spdx-tech mailing list [email protected] https://lists.spdx.org/mailman/listinfo/spdx-tech
