Repository navigation
Change license :: License to Either SPDX.License License - #5050
Conversation
|
|
2532243 to
eeb957a
Compare
|
I made |
eeb957a to
1b057fa
Compare
| -- If GHC >= 8.4 we register with SDPX, otherwise with legacy license | ||
| IPI.license = | ||
| if ghc84 | ||
| then Left $ either id licenseToSPDX $ licenseRaw pkg |
There was a problem hiding this comment.
This choice converts everything to SPDX, so in GHC-8.4 package databases will only contain SPDX expressions.
Alternatively we can let licenseRaw to go though unmodified, or convert only "sure" things (e.g. MIT, BSD3, GPL-3, not PublicDomain or OtherLicense)
|
How it's possible that in GHC-7.8.4 output https://travis-ci.org/haskell/cabal/jobs/330116951#L2091 I see ping @ezyang, any ideas? |
|
ping @ezyang , any ideas why tests fail on older GHC? For example https://travis-ci.org/haskell/cabal/jobs/330116951 |
|
Ah I see, it actually tests with |
|
You can change the GHC version check to |
|
@23Skidoo head is 8.5 so that won't work, I'll just temporarily skip the test for 8.4+ and unskip it when Cabal is updated in GHC-tree. |
23Skidoo
left a comment
There was a problem hiding this comment.
Looks all right from a quick glance.
Resolves haskell#2547 I introduce SimpleLicenseExpression to make "OrAnyLater LicenseRef" unrepresentable. That also simplifies types. license field is parsed as old `License` when cabal-version <2.2, and as SPDX expression otherwise. `NONE` is recognised. There are best-effort functions to convert between `License` and `SPDX.License`. There are also IPI changes: parser accepts both `License` and `SPDX.License`, as both can occur in package database. Cabal will `register` a SDPX expression as `license` for GHC >= 8.4, and legacy `License` for other (we are smart when converting `PackageDescription` + LBI and other data to `InstalledPackageInfo`) Also add NFData InstalledPackageInfo
569c123 to
ffbfafd
Compare
|
@23Skidoo do you want to take a closer look, or should I merge? (when travis is green, at least mostly) |
|
I'll try to later today, feel free to merge if I won't. |
|
I merged this now, any comments are still welcome |
WIP: [ci skip] Have to fix cabal-tests and check that we don't breakolder (i.e all) ghc-pkgs
Resolves #2547
I introduce SimpleLicenseExpression to make "OrAnyLater LicenseRef"
unrepresentable. That also simplifies types.
license field is parsed as old License when cabal-version <2.2,
and as SPDX expression otherwise. NONE is recognised.
There are also IPI changes, there both old and SPDX license expressions
are accepted, as both can occur in package database.
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!