Changes necessary to build on GHC 8.4.3#3372
Conversation
|
Reminder, ping @cnd when we merge this |
(use upstream PR purescript/purescript#3372)
(use upstream PR purescript/purescript#3372)
|
@kritzcreek thank you! I can verify that this patch works for me with 0.12 release and ghc 8.4.3 on Gentoo 👍 |
|
Looks like we're running into haskell/network#313 / commercialhaskell/stack#3944 for our AppVeyor build. Presumably that'll be fixed with network 2.7.0.1 but we'll have to old off until that's released and we tested that it fixes the Windows issues. |
|
What's this blocked on? As far as I can tell from travis the jobs just timed out? |
|
@angerman We need a release of spdx here: phadej/spdx#12 but the author is unresponsive so we might need to consider forking and maintaining it ourselves. @hdgarrood I think you introduced |
|
@phadej any advice on how to handle that? |
|
I don’t think it’s particularly complex, it’s just not the kind of thing I’d want to vendor if i could avoid to because it could be quite annoying for users if we get it wrong. Although I suppose we might not have much choice. I don’t have any strong preference for forking vs vendoring except that I suppose the former might imply more of a maintenance commitment which perhaps makes it less desirable. Do you mind if I leave it up to you? |
|
I suppose we could also simplify the check to “is the license field present and not equal to AllRightsReserved” or something similar, but I think it’s important to at least have something in place which helps prevent people uploading things to Pursuit without a genuine open source license. |
|
Could you use http://hackage.haskell.org/package/Cabal-2.2.0.1/docs/Distribution-SPDX.html |
So this is purely a client-side check? Is the check just meant to discourage people from uploading non-open-source licensed library or strictly prevent them? You can just upload things to Pursuit via HTTP so I don't think it's sufficient if we want the latter.
I don't have the capacities to maintain a fork, nor do I know my way around licenses to make a good educated decision, sorry... I'm just going to delete the SPDX dependent code in this PR, and if you can come up with a better solution you can just commit to my branch (collaborators have push access) |
|
Why purescript is using I'd not recommend to use spdx as is any longer, next version will reuse |
|
As for why it's not released: I haven't updated spdx license list in |
|
I wasn't aware that the Cabal library provided this; I think that would be a good option as well. |
|
@hdgarrood I'm more committed to updating |
|
We're currently having trouble with our CI builds timing out and work towards reducing the compilation times (eg. see #3400). So pulling in a dependency on the |
|
|
|
Do I also not need to compile and link it? |
|
You obviously need to link it, but as it comes with GHC you don't need to compile it (the objects files are there already); In the some way you don't need to compile |
|
That's good to know, thanks! |
This reverts commit 9432705.
|
Allright, so I've changed the code to use Does this work for you @hdgarrood? |
| -- | ||
| isValidSPDX :: String -> Bool | ||
| isValidSPDX = (== 1) . length . SPDX.parseExpression | ||
| isValidSPDX = isJust . SPDX.mkLicenseId |
There was a problem hiding this comment.
As I understand it, this will attempt to parse a license ID rather than a license expression, which means that e.g. "GPL-2.0+", meaning GPL 2.0 or any later version, would not be accepted. From looking at the docs, I think we need to use the Parsec instance for License, and then check that a) the parse succeeds and b) that the result is not NONE.
There was a problem hiding this comment.
I see, thanks for checking. How about now?
|
@LiamGoodacre or @garyb could I get a review on this? |
|
Thanks! |
|
Ping @cnd as promised ;) |
* changes necessary to build on GHC 8.4.2 * remove redundant Monoid imports * bumps to a 8.4.3 resolver * Updates for LTS-12 * Work around cabal/stack bug * Update node and stack versions on appveyor * removes spdx dependent code * Revert "removes spdx dependent code" This reverts commit 9432705. * use Cabal's SPDX parsing * use Cabal's Parsec class to parse licenses
This isn't ready just yet, because we need to depend on a GIT version of
spdxright now. The master for that package already builds, it just hasn't been released to Hackage yet.