[darcs-devel] [patch2017] support ghc-8.8 and ghc-8.10

Ben Franksen bugs at darcs.net
Tue Apr 28 10:25:31 UTC 2020


New submission from Ben Franksen <ben.franksen at online.de>:

This makes screened build cleanly (no warnings) with ghc-8.8 and ghc-8.10.

I started by selectively pulling patches from branch-2.14. As expected, most
of them conflicted. I would have liked to rebase them to avoid the
conflicts, but since rebase currently does not work correctly with
conflicted patches I could not do that. Therefore the many conflict
resolution patches. If you happen to find the time: it would be a valuable
real-world test of the new fullUnwind-based rebase implementation if you
were able to squash the conflict resolutions with the original patches
(please add a "[rebased]" marker to the patch name if you do that). I won't
immediately screen this bundle to give you some time to consider whether you
want to try that.

It turned out that shelly-1.9 breaks our shell tests even on Linux: the
harness no longer finds any of them. Since for Windows we already have a
special case here, requiring <1.7.2, I decided to import shelly-1.7.1 into
our source tree and fix the build problems, rather than keep waiting any
longer for upstream to get their homework done (which may in fact never
happen). This worked out remarkably well. However, it currently works only
when building from a darcs clone, since the files in the shelly sub
directory are not included in the cabal source dist. In the long run we
should consider switching to turtle, which is actually maintained by the
author (a well known and quite diligent member of the community).

Running the shell tests confirmed my suspicion that merely replacing fail
with error to avoid proliferating MonadFail constraints all over the place
is a bad idea. In fact there was only one single place where this is the
correct fix. In most other places we actually want to replace it with (throw
. userError), or, where possible, with (liftIO . fail). I will backport
these changes and the shelly patches to make a new 2.14.4 release.

33 patches for repository http://darcs.net/screened:

patch 46bebd0a1511232b216d387392d964cae6fcac2c
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 21 10:12:58 CEST 2020
  * loosen upper bound for haskeline to <0.9
  
  This is required to find a valid build plan for ghc >= 8.8.

patch 5d63e665634c964d7b23dcf9c28efc72d6a6f947
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 21 10:14:29 CEST 2020
  * loosen upper bound for shelly to <1.10
  
  This is required to find a build plan with ghc >= 8.8.
  
  A comment in the cabal file claims we cannot use shelly-1.9 because of two
  open issues. However, these issues only concern windows; but for windows we
  use an even stricter bound in a separate build-depend stanza, where we
  require < 1.7.2. I have moved the comment to this other stanza. The upshot
  is that building against ghc versions >= 8.8 is currently not supported on
  windows.

patch bc5ff9f3c122b590a26226091ab8717a6ba06abc
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 14:52:16 CEST 2020
  * resolve conflicts after 5d63e665634c964d7b23dcf9c28efc72d6a6f947

patch 2dbe7ff7042a2d909640f468c2d1dd39a00ca38b
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Apr 26 20:32:02 CEST 2020
  * darcs.cabal: clean up extra-source-files
  
  Also added C source files in addition to header files.

patch 9c2e42144da778426b09f6c3b8ec03d285a106b7
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 15:15:40 CEST 2020
  * resolve conflicts after 2dbe7ff7042a2d909640f468c2d1dd39a00ca38b

patch 353a1cfd0a42393b568c32f328b8a7d626a327f0
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 15:16:27 CEST 2020
  * fix license in darcs.cabal

patch 447f754fd0613f221cdf6174e67a2e020d71bdb6
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 21 08:45:05 CEST 2020
  * for base >=4.13 define fail in MonadFail instances

patch 8322b50f998b2f2244937d629ad66becf0f4df1e
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 21 15:00:04 CEST 2020
  * add some elementary build instructions to the README.md

patch cacc6c44c3e8ae94e3aa3456e3f0ded9d00371f5
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 21 12:47:18 CEST 2020
  * adapt release/release.sh for use with modern cabal

patch 82fe27cc6295a2e55936b3b1ff10fcb4966e1e5e
Author: Ben Franksen <ben.franksen at online.de>
Date:   Fri Apr 24 10:45:44 CEST 2020
  * mitigate issue2643 with a better error message
  
  If the patch index is corrupt, output the name of the currupt file and
  suggest its removal.

patch 838279091622f16b331cef25c0b96aac01ad71d4
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 15:32:18 CEST 2020
  * resolve conflicts after 447f754fd0613f221cdf6174e67a2e020d71bdb6

patch cf2e7bcff2195e03410305ffc25f2282e35f32a4
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 15:34:05 CEST 2020
  * resolve conflicts after 82fe27cc6295a2e55936b3b1ff10fcb4966e1e5e

patch 347aeb4b5c1eccfe00956ac318a2123bca9ef9ca
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Apr 26 20:26:07 CEST 2020
  * clean up Darcs.Test.Patch.Check
  
  There was a comment in the code about the strangeness of how in this test
  module returning a Boolean was used to communicate a failure, and how this
  should be replaced with a more conventional way of error handling. This is
  now done, using the MaybeT monad transformer.

patch f85f4c41eeb116483655b6cd6c337845e63226ce
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 15:54:37 CEST 2020
  * resolve conflicts after 347aeb4b5c1eccfe00956ac318a2123bca9ef9ca

patch 64b5842ba3e32290d9eb479c8281eff4cfcea443
Author: Ben Franksen <ben.franksen at online.de>
Date:   Fri Apr 24 15:27:26 CEST 2020
  * add changelog entry for release 2.14.3

patch 31c1837213befdef6b8ff513ad20ea7aaebbca1b
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 16:03:42 CEST 2020
  * darcs.cabal: remove redundant version constraints

patch 3c481cfde19965f004913f1798a3036b4437bf59
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 16:22:29 CEST 2020
  * remove a redundant import from Setup.hs

patch 5f6825daaa5a145f827c83d0e1db826c45ee09e3
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Apr 26 21:04:14 CEST 2020
  * no longer export fromJust from Darcs.Prelude [amended from branch-2.14]
  
  While used in many places, fromJust is a partial function and we should not
  encourage its unfettered use in Darcs.

patch 80223edc7108090f9c3231e36d4bdb94e1f52f6a
Author: Ben Franksen <ben.franksen at online.de>
Date:   Sun Apr 26 20:40:58 CEST 2020
  * remove redundant imports
  
  This mostly concerns (<>) imported from Darcs.Util.Printer and (<$>) from
  Control.Applicative. These are now consistently exported from Darcs.Prelude.

patch 68d2ba7bfe8b65168b2be95017ab5209521eccbd
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 21:03:00 CEST 2020
  * import shelly-1.7.1 as a new subdirectory

patch 241fee554ecef415e3c16e1147cf5c8d47b0af6b
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 22:01:25 CEST 2020
  * make shelly build w/o warning for all supported compilers

patch e24a22c1c41b52bb0f1436abaf24704ea7bdc985
Author: Ben Franksen <ben.franksen at online.de>
Date:   Mon Apr 27 22:02:30 CEST 2020
  * remove the special shelly upper bound for windows
  
  This is no longer necessary as cabal will now always use our (fixed) copy of
  shelly-1.7.1, at least when built from a clone. The cabal source distribution
  won't be able to run the shell tests.
  This is stop-gap-measure. We should eventually get rid of shelly.

patch ef62aa290cb72fdc8b06a11307cdebaad2a8f321
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:03:17 CEST 2020
  * resolve conflicts after 80223edc7108090f9c3231e36d4bdb94e1f52f6a

patch 466f1ac0b9623d0fa8c3ddf19f338af504d0b89c
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:25:30 CEST 2020
  * unwind tests: use condition compilation for MonadFail instances and imports

patch 670806d16f3fd429b009d826c01c7199c1e3c745
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:28:22 CEST 2020
  * avoid use of fail in Darcs.Patch.Depends.unwrapOneTagged
  
  We specialize to monad Maybe and directly use Nothing.

patch ac8509387d1f8b87d3c8aeb758bd492b1a5ebfda
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:30:00 CEST 2020
  * more consequently throw MatchFailure exception
  
  This avoids two uses of fail in Darcs.Patch.Match in the context of a monad
  tranformer that is not necessarily IO based.

patch 5e2b79a3fc963ca1b8cfcd72b5ccf2f0d39d6837
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:32:54 CEST 2020
  * Darcs.Util.Prompt: add liftIO when calling fail 

patch 4ff9cb1b4352e2a447cead067ea5cc1a34929c9c
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:38:38 CEST 2020
  * replace fail with error in Darcs.Repository.Diff
  
  This is the /only/ case where the "quick fix" of replacing fail with error
  is semantically valid. Here we clearly have a partial pattern match and it
  would be a bug if we hit that case.

patch d2c7b97789f538ac80a9547ed86db06ad57aa209
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:41:27 CEST 2020
  * replace fail with throw.userError when applying a patch
  
  There are several uses of apply (and its variants) where we catch
  IOExceptions e.g. maybeApplyToTree. This makes sense: if we apply in the
  context of IO (or a transformer over IO), then there may occur any kind of
  IOException, not only the ones explicitly raised from our code, and we want
  to catch them all.

patch faaceaffbf4c60a73c0c5643ea107ad8a2f8c753
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:49:16 CEST 2020
  * replace fail with throw.userError in Tree monads and index matching
  
  The situation here is different from that of patch application. Here we want
  the exception to percolate all the way up to the top level handler. In other
  words, these are regular failures similar to IO exceptions.

patch 9e9c1c5e2c6b23632605a5885d958b3cd3e20bb1
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 08:54:21 CEST 2020
  * replace runhaskell with runghc in tests/renames.sh
  
  It seems runghc is better supported by ghc packagers than runhaskell. This
  is not a complete solution, though. If cabal is used with
  --with-compiler=/path/to/ghc, there is no guarantee that we have a runghc or
  a runhaskell in the PATH.

patch 5e216ccf2ae019a95d16a9830185ced1720c9de8
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 09:43:25 CEST 2020
  * darcs.cabal: remove containers from setup-depends

patch c7fb6002aa234d1462bbf70c32334497f17e0fa7
Author: Ben Franksen <ben.franksen at online.de>
Date:   Tue Apr 28 11:00:37 CEST 2020
  * raise upper bounds for base and Cabal dependencies
  
  This allows to build with ghc-8.8 and ghc-8.10.

----------
files: loosen-upper-bound-for-haskeline-to-_0_9.dpatch, patch-preview.txt, unnamed
messages: 22006
nosy: bf
status: needs-screening
title: support ghc-8.8 and ghc-8.10

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2017>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 379945 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200428/2b0fdb42/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loosen-upper-bound-for-haskeline-to-_0_9.dpatch
Type: application/x-darcs-patch
Size: 413139 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200428/2b0fdb42/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list