Repository navigation
Versioned licenses: specifying only-this-version or any-later-version - #4732
bucklereed wants to merge 2 commits into
Conversation
These forms will be accepted without complaint when the `cabal-version` field is less than 2.1, but are mandatory if it's above 2.1. As a knock-on of that, version numbers for versioned licenses are mandatory above 2.1 as well. This is necessary because just saying 'GPL' is hopelessly underspecified: there is an enormous difference between v2 and v3, and significant practical differences between v2-only and v2+ (e.g., the latter can be upgraded to v3 and then can incorporate Apache 2.0 licensed code, but the former cannot). Refusing the temptation to guess is the only sane option here, and, hence, ambiguous forms must be rejected. Old Cabals will complain about the new forms, but not to the point of rejecting them. New Cabals will happily accept both new and old forms when `cabal-version` is low, and the strict behaviour is only triggered by a sufficiently high `cabal-version`. This means that there will be no surprises for existing projects until they opt in to having a newer `cabal-version`.
|
@bucklereed, thanks for your PR! By analyzing the history of the files in this pull request, we identified @hvr, @dcoutts and @phadej to be potential reviewers. |
|
The issue is valid, but I'm 👎 on the solution, and rather implement #2547 then inventing own syntax. There's http://hackage.haskell.org/package/spdx which we can vendor in. |
|
My objection to SPDX syntax (and the + convention generally) is that it privileges the exact-match semantics (by being shorter and looking like the 'default'), which is not the recommended way to apply the GPL family of licenses, and which does lead to pain down the road if it's thoughtlessly applied. |
|
I'm not quite sure what's going on with the AppVeyor build. It looks like there are missing reference files, but the tests pass on my machine and |
|
... yet, spdx solves other problems too like dual licensing (both conjuctive and disjuctive). Inventing own syntax for a thing which already has one is :( |
|
I'm with @phadej on this one, I think (FWIW). @bucklereed What are the chances of "upstreaming" the necessary 'bits' to have spdx fully support the currently unsupported use cases? Is it even possible? |
|
I like the idea of using an already-existing standard for this, but the question is: who will implement it? #2547 has been open for a while now, and nothing has happened. |
|
I can implement spdx stuff as soon as I'm done refactoring parser. AFAIK no green light were given for implementing spdx |
|
For what it's worth, I too believe that SPDX is the way to go forward. It's a well established standard that's been widely adopted elsewhere and I'd very much like to have its expressive power available in Cabal files. The current solution is very limited and doesn't do much more than "give a hint", which isn't worth very much to anyone who worries about the legal implications of using certain code. |
|
OK, the consensus seems to be that SPDX is the way forward. @bucklereed |
|
I'm leaving this open for now in case the SPDX PR never materialises and to serve as a reminder. |
These forms will be accepted without complaint when the
cabal-versionfield is less than 2.1, but are mandatory if it's above 2.1. As a
knock-on of that, version numbers for versioned licenses are mandatory
above 2.1 as well.
This is necessary because just saying 'GPL' is hopelessly
underspecified: there is an enormous difference between v2 and v3, and
significant practical differences between v2-only and v2+ (e.g., the
latter can be upgraded to v3 and then can incorporate Apache 2.0
licensed code, but the former cannot). Refusing the temptation to
guess is the only sane option here, and, hence, ambiguous forms must
be rejected.
Old Cabals will complain about the new forms, but not to the point of
rejecting them. New Cabals will happily accept both new and old forms
when
cabal-versionis low, and the strict behaviour is onlytriggered by a sufficiently high
cabal-version. This means thatthere will be no surprises for existing projects until they opt in to
having a newer
cabal-version.Seven new tests (which are blowing up the diffstat, because that's seven whole copies of the GPLv2...).