Skip to content

Versioned licenses: specifying only-this-version or any-later-version - #4732

Closed
bucklereed wants to merge 2 commits into
haskell:masterfrom
bucklereed:license-version-bounds
Closed

bucklereed wants to merge 2 commits into
haskell:masterfrom
bucklereed:license-version-bounds

Conversation

@bucklereed

Copy link
Copy Markdown

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.

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

Seven new tests (which are blowing up the diffstat, because that's seven whole copies of the GPLv2...).

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`.
@mention-bot

Copy link
Copy Markdown

@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.

@phadej

phadej commented Aug 31, 2017

Copy link
Copy Markdown
Collaborator

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.

@bucklereed

Copy link
Copy Markdown
Author

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.

@bucklereed

Copy link
Copy Markdown
Author

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 git status is clean. I generated the reference setup.out files with cabal-tests --accept; did I need to do something else?

@phadej

phadej commented Aug 31, 2017 •

Copy link
Copy Markdown
Collaborator

... yet, spdx solves other problems too like dual licensing (both conjuctive and disjuctive). Inventing own syntax for a thing which already has one is :(

@BardurArantsson

Copy link
Copy Markdown
Collaborator

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?

@23Skidoo

23Skidoo commented Sep 1, 2017 •

Copy link
Copy Markdown
Member

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.

@phadej

phadej commented Sep 1, 2017

Copy link
Copy Markdown
Collaborator

I can implement spdx stuff as soon as I'm done refactoring parser. AFAIK no green light were given for implementing spdx

@peti

peti commented Sep 1, 2017 •

Copy link
Copy Markdown
Collaborator

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.

@23Skidoo

23Skidoo commented Sep 1, 2017

Copy link
Copy Markdown
Member

OK, the consensus seems to be that SPDX is the way forward.

@bucklereed
Thanks for the work you've done on this PR and for reviving the discussion about #2547. Would you be interested to work on #2547 together with @phadej?

@23Skidoo

Copy link
Copy Markdown
Member

I'm leaving this open for now in case the SPDX PR never materialises and to serve as a reminder.

@phadej
phadej self-requested a review December 16, 2017 09:31
@phadej phadej self-assigned this Dec 16, 2017
@23Skidoo

23Skidoo commented Jan 3, 2018

Copy link
Copy Markdown
Member

There has been major progress on SPDX front (see #4913), and it looks like @phadej will finish it in time for the 2.2 release, so I'm closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants