ayaports/apk/v3.15/main/git-annex/0001-fix-build-with-ghc-9.0.1.patch

76 lines
2.3 KiB
Diff

From 4b19626a3624ebb23b86df8195e1ec0509b70f24 Mon Sep 17 00:00:00 2001
From: Joey Hess <joeyh@joeyh.name>
Date: Wed, 8 Dec 2021 15:08:02 -0400
Subject: Fix build with ghc 9.0.1
Continuing along the same lines as commit
2739adc25814633b18174982977e00e809cb789e, it seems that
while Remote -> Retriever expands to the same data type this changes
it to, ghc 9.0.1 refuses to consider them equiviant. I guess it has
something to do with the forall?
The rest of the build all succeeds, although the stack build then crashes:
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.0.0/build/git-annex/git-annex ...
Completed 233 action(s).
Prelude.chr: bad argument: 2214592520
This issue seems likely to be about it:
https://github.com/commercialhaskell/stack/pull/5508
I'm building with stack from debian, version 2.3.3, so a newer stack
probably avoids that. Anyway, despite that stack problem,
the git-annex binary is built, and works.
The stack.yaml I used for this build was patched as follows:
diff --git a/stack.yaml b/stack.yaml
index 8dac87c15..62c4b5b9d 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,6 +1,6 @@
flags:
git-annex:
- production: true
+ production: false
assistant: true
pairing: true
torrentparser: true
@@ -14,7 +14,7 @@ flags:
httpclientrestricted: true
packages:
- '.'
-resolver: lts-18.13
+resolver: nightly-2021-09-07
extra-deps:
- IfElse-0.85
- aws-0.22
Sponsored-by: Graham Spencer on Patreon
---
CHANGELOG | 1 +
Remote/Glacier.hs | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs
index eaf0a5cc8..37d4f1e44 100644
--- a/Remote/Glacier.hs
+++ b/Remote/Glacier.hs
@@ -28,6 +28,7 @@ import Utility.Metered
import Annex.UUID
import Utility.Env
import Types.ProposedAccepted
+import Utility.Hash (IncrementalVerifier)
type Vault = String
type Archive = FilePath
@@ -175,7 +176,7 @@ store' r k b p = go =<< glacierEnv c gc u
forceSuccessProcess cmd pid
go' _ _ _ _ _ = error "internal"
-retrieve :: Remote -> Retriever
+retrieve :: forall a. Remote -> Key -> MeterUpdate -> Maybe IncrementalVerifier -> (ContentSource -> Annex a) -> Annex a
retrieve = byteRetriever . retrieve'
retrieve' :: forall a. Remote -> Key -> (L.ByteString -> Annex a) -> Annex a
--
cgit v1.2.3