This commit is contained in:
gnezdo 2022-04-25 16:29:11 +00:00 committed by admin
parent b25bfecb1b
commit c1885e1457

View file

@ -0,0 +1,84 @@
### Please describe the problem.
Some dependencies of `git-annex` don't have viable releases for ghc-9.2.2 (aws, bloomfilter).
```
cabal v2-build
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: bloomfilter-2.0.1.0 (user goal)
[__1] trying: deepseq-1.4.6.1/installed-1.4.6.1 (dependency of bloomfilter)
[__2] trying: bytestring-0.11.3.0/installed-0.11.3.0 (dependency of
bloomfilter)
[__3] trying: base-4.16.1.0/installed-4.16.1.0 (dependency of bloomfilter)
[__4] trying: git-annex-10.20220322 (user goal)
[__5] trying: uuid-1.3.15 (dependency of git-annex)
[__6] trying: time-1.11.1.1/installed-1.11.1.1 (dependency of git-annex)
[__7] trying: aws-0.22 (dependency of git-annex)
[__8] next goal: aeson (dependency of git-annex)
[__8] rejecting: aeson-2.0.3.0 (conflict: aws => aeson>=0.6 && <1.6)
[__8] skipping: aeson-2.0.2.0, aeson-2.0.1.0, aeson-2.0.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=0.6 && <1.6' from 'aws')
...
```
### What steps will reproduce the problem?
`cabal v2-build [--allow-newer]`
### What version of git-annex are you using? On what operating system?
I checked out HEAD as of `b25bfecb1`. Building it on OpenBSD with ghc-9.2.2.
### Please provide any additional information below.
Building with `--allow-newer` first points at `bloomfilter` which is a [known problem with a patch](https://github.com/bos/bloomfilter/pull/20). The next problem is with `aws` and this appears to [also be a known issue](https://github.com/aristidb/aws/issues/275) which also [has a patch](https://github.com/aristidb/aws/pull/277).
### Have you had any luck using git-annex before?
Yes, very much so. It works great as an OpenBSD port when built with ghc-8.10.6.
### Minor fix is required to git-annex
Once I apply this little fix to `git-annex` and the two patches referenced above, the code type-checks.
```patch
diff --git a/Types/Export.hs b/Types/Export.hs
index a5cb173e5..2d5419b91 100644
--- a/Types/Export.hs
+++ b/Types/Export.hs
@@ -21,7 +21,7 @@ import Git.FilePath
import Utility.Split
import Utility.FileSystemEncoding
-import Data.ByteString.Short as S
+import qualified Data.ByteString.Short as S
import qualified System.FilePath.Posix as Posix
import GHC.Generics
import Control.DeepSeq
```
I also see all but one tests pass, but I'm pretty sure the same test used to fail with the older compiler:
```
Tests
Tasty
tasty self-check: OK
+++ OK, passed 1 test.
Repo Tests v8 locked
Init Tests
init: OK (0.77s)
add: OK (2.71s)
rsync remote: FAIL (3.58s)
./Test/Framework.hs:328:
able to modify annexed file's foo content
Use -p '/rsync remote/' to rerun this test only.
conflict resolution (adjusted branch): OK (16.26s)
conversion annexed to git: OK (3.32s)
move (ssh remote): OK (6.11s)
export_import: OK (13.23s)
1 out of 8 tests failed (46.00s)
```