jgm / gitit

A wiki using HAppS, pandoc, and git
GNU General Public License v2.0
2.15k stars 225 forks source link

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

Closed octalsrc closed 4 years ago

octalsrc commented 4 years ago

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 commented 4 years ago

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

jgm commented 4 years ago

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

octalsrc commented 4 years ago

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 https://github.com/haskell-hvr/missingh/pull/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 commented 4 years ago

Excellent, many thanks.

jgm commented 4 years ago

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

freiric commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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: https://github.com/haskell-hvr/missingh/pull/51, https://github.com/haskell-infra/hackage-trustees/issues/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 commented 4 years ago

Ah yes, you did say that -- sorry!