From 95998813b19ad11165fb296dac2889c17afe410b Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Thu, 31 Oct 2024 10:24:12 +0800 Subject: [PATCH 1/2] Update dependencies --- cabal.project | 3 +-- foliage.cabal | 12 ++++++------ tests/Tests.hs | 12 ++++++------ 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/cabal.project b/cabal.project index ffb194d..9a33e46 100644 --- a/cabal.project +++ b/cabal.project @@ -1,6 +1,5 @@ packages: . -index-state: 2023-09-10T21:31:08Z -with-compiler: ghc-9.4.8 +index-state: 2024-10-31T00:00:00Z tests: True test-show-details: direct diff --git a/foliage.cabal b/foliage.cabal index 4c1ff7e..abd9eb1 100644 --- a/foliage.cabal +++ b/foliage.cabal @@ -43,14 +43,14 @@ executable foliage Network.URI.Orphans build-depends: - base >=4.14.3.0 && <4.20, + base >=4.14.3.0 && <4.21, aeson >=2.2 && <2.3, base16 >=0.3.2.0 && <1.1, binary >=0.8.9.0 && <0.9, bytestring >=0.10.12.0 && <0.13, - Cabal >=3.10 && <3.12, - Cabal-syntax >=3.10 && <3.12, - cabal-install >=3.10 && <3.12, + Cabal >=3.10 && <3.15, + Cabal-syntax >=3.10 && <3.15, + cabal-install >=3.10 && <3.15, containers >=0.6.5.1 && <0.7, cryptohash-sha256 >=0.11.102.1 && <0.12, directory >=1.3.6.0 && <1.4, @@ -61,13 +61,13 @@ executable foliage optparse-applicative >=0.17.0.0 && <0.18, shake >=0.19.6 && <0.20, stache >=2.3.3 && <2.4, - tar >=0.5.1.1 && <0.6, + tar >=0.5.1.1 && <0.7, text >=1.2.4.1 && <2.2, time >=1.9.3 && <1.13, time-compat >=1.9.6.1 && <1.10, tomland >=1.3.3.1 && <1.4, vector >=0.13.0.0 && <0.14, - with-utf8 >=1.0.2.3 && <1.1, + with-utf8 >=1.0.2.3 && <1.2, zlib >=0.6.2.3 && <0.7, test-suite foliage-test-suite diff --git a/tests/Tests.hs b/tests/Tests.hs index 20119ea..56b6e39 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -1,6 +1,6 @@ {-# LANGUAGE LambdaCase #-} -import Codec.Archive.Tar.Entry (Entry (..)) +import Codec.Archive.Tar.Entry (entryTime) import Foliage.Tests.Tar import Foliage.Tests.Utils import System.Directory @@ -29,13 +29,13 @@ main = do doesFileExist "_repo/snapshot.json" @? "snapshot.json does not exist" doesFileExist "_repo/timestamp.json" @? "timestamp.json does not exist" - withTarball "_repo/01-index.tar" $ \TarballAccessFn{lookupEntry} -> do + withTarball "_repo/01-index.tar" $ \TarballAccessFn {lookupEntry} -> do lookupEntry "pkg-a/2.3.4.5/pkg-a.cabal" >>= \case Nothing -> assertFailure "entry for pkg-a-2.3.4.5 is missing" Just entry -> do - entryTime entry @?= 1648534790 - , --- + entryTime entry @?= 1648534790, + --- testCaseSteps "accepts --no-signatures" $ \step -> inTemporaryDirectoryWithFixture "tests/fixtures/simple" $ do step "Building repository" @@ -43,8 +43,8 @@ main = do step "Running checks" doesExist <- doesDirectoryExist "_keys" - doesExist @?= False - , --- + doesExist @?= False, + --- testCaseSteps "accepts --write-metadata" $ \step -> inTemporaryDirectoryWithFixture "tests/fixtures/simple" $ do step "Building repository" From 1c3da844e0c0d69956c3840b580bb1efdd201a1c Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Thu, 31 Oct 2024 15:00:33 +0800 Subject: [PATCH 2/2] Formatting --- tests/Tests.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Tests.hs b/tests/Tests.hs index 56b6e39..e6a3b29 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -29,13 +29,13 @@ main = do doesFileExist "_repo/snapshot.json" @? "snapshot.json does not exist" doesFileExist "_repo/timestamp.json" @? "timestamp.json does not exist" - withTarball "_repo/01-index.tar" $ \TarballAccessFn {lookupEntry} -> do + withTarball "_repo/01-index.tar" $ \TarballAccessFn{lookupEntry} -> do lookupEntry "pkg-a/2.3.4.5/pkg-a.cabal" >>= \case Nothing -> assertFailure "entry for pkg-a-2.3.4.5 is missing" Just entry -> do - entryTime entry @?= 1648534790, - --- + entryTime entry @?= 1648534790 + , --- testCaseSteps "accepts --no-signatures" $ \step -> inTemporaryDirectoryWithFixture "tests/fixtures/simple" $ do step "Building repository" @@ -43,8 +43,8 @@ main = do step "Running checks" doesExist <- doesDirectoryExist "_keys" - doesExist @?= False, - --- + doesExist @?= False + , --- testCaseSteps "accepts --write-metadata" $ \step -> inTemporaryDirectoryWithFixture "tests/fixtures/simple" $ do step "Building repository"