packages feed

cabal-cache 1.0.0.0 → 1.0.0.1

raw patch · 2 files changed

+14/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

cabal-cache.cabal view
@@ -1,7 +1,7 @@ cabal-version:          2.2  name:                   cabal-cache-version:                1.0.0.0+version:                1.0.0.1 synopsis:               CI Assistant for Haskell projects description:            CI Assistant for Haskell projects.  Implements package caching. homepage:               https://github.com/haskell-works/cabal-cache@@ -58,7 +58,7 @@   default-language:     Haskell2010  library-  import: base, config+  import:   base, config           , aeson           , amazonka           , amazonka-core@@ -86,6 +86,7 @@           , temporary           , text           , time+                   , unliftio           , zlib   other-modules:        Paths_cabal_cache@@ -138,6 +139,7 @@           , lens           , raw-strings-qq           , text+           type:                 exitcode-stdio-1.0   main-is:              Spec.hs   build-depends:        cabal-cache
src/HaskellWorks/Ci/Assist/IO/Lazy.hs view
@@ -29,6 +29,7 @@  import qualified Antiope.S3.Lazy                   as AWS import qualified Antiope.S3.Types                  as AWS+import qualified Control.Concurrent                as IO import qualified Data.ByteString.Lazy              as LBS import qualified Data.Text                         as T import qualified Data.Text.IO                      as T@@ -117,10 +118,18 @@     then return (Right ())     else return (Left "") +retry :: MonadIO m => Int -> ExceptT String m () -> ExceptT String m ()+retry n f = catchError f $ \e -> if n > 0+  then do+    liftIO $ CIO.hPutStrLn IO.stderr $ "WARNING: " <> T.pack e <> " (retrying)"+    liftIO $ IO.threadDelay 1000000+    retry (n - 1) f+  else throwError e+ linkOrCopyResource :: MonadUnliftIO m => AWS.Env -> Location -> Location -> ExceptT String m () linkOrCopyResource envAws source target = case source of   S3 sourceS3Uri -> case target of-    S3 targetS3Uri -> do copyS3Uri envAws sourceS3Uri targetS3Uri+    S3 targetS3Uri -> retry 3 (copyS3Uri envAws sourceS3Uri targetS3Uri)     Local _        -> throwError "Can't copy between different file backends"   Local sourcePath -> case target of     S3 _             -> throwError "Can't copy between different file backends"