-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SPDX license identifiers (see #292) #294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one ignorable suggestion aside.
src/Hpack/License.hs
Outdated
Left _ -> case cabalLicense of | ||
Right l -> CanSPDX (Cabal.licenseToSPDX l) | ||
Left _ -> DontTouch | ||
where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be clearer to write these cases like this:
Right l | isRight cabalLicense -> CanSPDX l
Right l -> MustSPDX l
Left _ -> case cabalLicense of
Right l -> CanSPDX (Cabal.licenseToSPDX l)
Left _ -> DontTouch
Then we can also get rid of the hard-coded knocnLicenses
list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait, that'll go wrong because UnknownLicense
exists. Ugh, annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. Right now we don't touch unknown stuff so that Cabal will fail on typos in SPDX license identifiers. Otherwise e.g. GPL-2.0-olny
would be converted to LicenseRef-GPL-2.0-olny
, which I assume we don't want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added one more test to make it more clear what's happening here: 4d23731
CI should be fixed by just bumping the stack resolver to something recent. |
Anybody knows what the AppVeyor build issue is about? Apparently due to |
Using the LTS 12.0 resolver instead of a nightly might fix the |
Oh, I do know this one. In fact I helped fix it in Cabal HEAD! commercialhaskell/stack#3944 has all the details, but the TLDR is that setting |
@quasicomputational do you know if a different stackage snapshot as suggested by @tfausak will also help? |
No, I don't think it will. The problem is that the temporary directory generated by AppVeyor looks like |
Ah, yup. LTS 12 doesn't fix this problem on AppVeyor: https://ci.appveyor.com/project/TaylorFausak/rattletrap/build/446#L336 |
Very strange. We did not change building system for 2.6. |
@quasicomputational this sounds scary. I'm surprised that this wasn't included in a bug fix release yet. |
Still failing on Windows, not sure what the gist of it is... |
I oppened #295 for the failing AppVeyor build. |
Merged! @quasicomputational thanks for the review :) |
cabal-version: 2.2
when SPDX license identifiers are usedcabal-version
is 2.2 or higher