Skip to content
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

Update for GHC 8.8.x and newer versions of network, hoauth2, feed #646

Merged
merged 5 commits into from
Mar 6, 2020

Conversation

octalsrc
Copy link
Contributor

@octalsrc octalsrc commented Mar 2, 2020

This update allows gitit to be compiled with GHC 8.8.x (using base-4.13.0.0), network-3.x, hoauth2-1.11.x, and feed-1.3.x.

All are small changes which do not change gitit's behavior. Each is explained in its relevant commit message. The updates needed for each library are independent---they could be pull-requested individually if that's helpful.

@octalsrc
Copy link
Contributor Author

octalsrc commented Mar 2, 2020

For context, this allows gitit to be built under the latest nixpkgs unstable package set.

@jgm
Copy link
Owner

jgm commented Mar 2, 2020

Thanks very much for taking this on! Unfortunately the CI builds are still failing. Maybe you can see what the issue is? (Btw, the commit message should indicate clearly any API changes -- e.g. the type change for Rpxnow.authenticate -- and with that API change we'll need a bump in the second version number.)

GHC 8.8's base-4.13.0.0 removes `fail` from Monad, requiring a few
uses of `fail` to be removed and the json dependency to be updated.

Because arbitrary `Monad` instances no longer support failure, the
`Monad m` used in the return type of Network.Gitit.Rpxnow.authenticate
has been fixed as `Either String`.
@octalsrc octalsrc changed the title Update for GHC 8.8.x and newer versions of some libraries Update for GHC 8.8.x Mar 5, 2020
This also fixes type mismatches that prevent compiling with
hoauth-1.9.x
network-3.0.0.0 moves the Network.BSD module into its own
"network-bsd" package and removes deprecated API elements.  This
requires a new dependency on "network-bsd" and a code change to stop
using the removed inet_addr function.

This change also adds < 3.2 as an upper bound for network (there was
previously no upper bound).
The changes to EntryContent in feed-1.2.0.0 were reverted in 1.3.0.0

http://hackage.haskell.org/package/feed-1.3.0.0/changelog

haskell-party/feed#35

Updating to feed-1.3.0.0 required simply reverting the changes to
Network.Gitit.Feed which were made in commit
d783f12.  The changed versions from
that commit are retained using CPP to switch them in so that
feed-1.2.x remains supported for now.
The Linux CI builds were all failing because `cabal v2-test all`
exited with an error when called, due to there being no tests.
@octalsrc octalsrc changed the title Update for GHC 8.8.x Update for GHC 8.8.x and newer versions of network, hoauth2, feed Mar 6, 2020
@octalsrc
Copy link
Contributor Author

octalsrc commented Mar 6, 2020

I've bumped the package version and documented the Rpxnow API change in the commit and in a new changelog entry.

Most of the Linux CI builds were failing due to calling cabal v2-test all when there are no tests, which exits with failure and prints the error cabal: Cannot run tests for the target 'all' which refers to all the packages in the project because they do not contain any test suites. I removed the test command from the CI configuration to fix this (since there are no tests).

Two failures remain.

  1. Linux (GHC 8.8.1): The MissingH library, a dependency of the ConfigFile library, cannot be built because it requires base < 4.13. It seems a new MissingH release that simply bumps this bound (see Bump bounds for base for ghc 8.8 haskell-hvr/missingh#51) would fix the problem.

    (The GHC 8.8 build succeeds on my machine under NixOS despite the issue because MissingH has been "jailbroken" in the nixpkgs Haskell package set to fix this)

  2. continuous-integration/travis-ci/pr: This one is complaining that two transitive dependencies, json and MissingH, are not included in the "stack configuration". The current master branch fails this check for the same reason. I'm unfamiliar with Stack, so I don't know what the right fix for this would be.

@jgm jgm merged commit 862824c into jgm:master Mar 6, 2020
@jgm
Copy link
Owner

jgm commented Mar 6, 2020

Excellent, many thanks.

@jgm
Copy link
Owner

jgm commented Mar 6, 2020

I still can't get it to build with stack. If anyone can help here, that would be great.

@freiric
Copy link
Contributor

freiric commented Mar 7, 2020

I can build with stack on the command line, if you mean that the Travis CI build fails to build with stack, I've submitted PR #648 .

@jgm
Copy link
Owner

jgm commented Mar 9, 2020

@octalsrc After merging this I'm still seeing CI build failures on GHC 8.8 on the CI (see the Actions tab on this repository). Other GHC versions build well now with cabal, but not 8.8.
Can you look into this? The title of this PR suggests that it is supposed to support GHC 8.8.

@octalsrc
Copy link
Contributor Author

octalsrc commented Mar 9, 2020

As I said in my last comment in this thread, the GHC 8.8.1 build fails because:

The MissingH library, a dependency of the ConfigFile library, cannot be built because it requires base < 4.13. It seems a new MissingH release that simply bumps this bound (see haskell-hvr/missingh#51) would fix the problem.
(The GHC 8.8 build succeeds on my machine under NixOS despite the issue because MissingH has been "jailbroken" in the nixpkgs Haskell package set to fix this)

So Cabal with GHC 8.8 in a vanilla environment won't be able to build Gitit (or anything that depends on MissingH) until MissingH is updated. There are two PRs related to this that could use some attention: haskell-hvr/missingh#51, haskell-infra/hackage-trustees#253.

I can edit the title of this PR to something like "Prepare for future GHC 8.8.x builds".

And for reference, NixOS unstable is using GHC 8.8.2, so that's what I've tested this with.

@jgm
Copy link
Owner

jgm commented Mar 9, 2020

Ah yes, you did say that -- sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants