packages feed

cabal-cache 1.0.1.9 → 1.0.2.0

raw patch · 6 files changed

+29/−11 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ App.Commands.Options.Types: [$sel:buildPath:SyncFromArchiveOptions] :: SyncFromArchiveOptions -> FilePath
+ App.Commands.Options.Types: [$sel:buildPath:SyncToArchiveOptions] :: SyncToArchiveOptions -> FilePath
+ App.Static: buildPath :: FilePath
- App.Commands.Options.Types: SyncFromArchiveOptions :: Region -> [Location] -> FilePath -> Maybe String -> Int -> Maybe LogLevel -> SyncFromArchiveOptions
+ App.Commands.Options.Types: SyncFromArchiveOptions :: Region -> [Location] -> FilePath -> FilePath -> Maybe String -> Int -> Maybe LogLevel -> SyncFromArchiveOptions
- App.Commands.Options.Types: SyncToArchiveOptions :: Region -> Location -> FilePath -> Maybe String -> Int -> Maybe LogLevel -> SyncToArchiveOptions
+ App.Commands.Options.Types: SyncToArchiveOptions :: Region -> Location -> FilePath -> FilePath -> Maybe String -> Int -> Maybe LogLevel -> SyncToArchiveOptions
- HaskellWorks.CabalCache.Core: loadPlan :: IO (Either AppError PlanJson)
+ HaskellWorks.CabalCache.Core: loadPlan :: FilePath -> IO (Either AppError PlanJson)

Files

cabal-cache.cabal view
@@ -1,7 +1,7 @@ cabal-version:          2.2  name:                   cabal-cache-version:                1.0.1.9+version:                1.0.2.0 synopsis:               CI Assistant for Haskell projects description:            CI Assistant for Haskell projects.  Implements package caching. homepage:               https://github.com/haskell-works/cabal-cache
src/App/Commands/Options/Types.hs view
@@ -12,6 +12,7 @@ data SyncToArchiveOptions = SyncToArchiveOptions   { region        :: Region   , archiveUri    :: Location+  , buildPath     :: FilePath   , storePath     :: FilePath   , storePathHash :: Maybe String   , threads       :: Int@@ -21,6 +22,7 @@ data SyncFromArchiveOptions = SyncFromArchiveOptions   { region        :: Region   , archiveUris   :: [Location]+  , buildPath     :: FilePath   , storePath     :: FilePath   , storePathHash :: Maybe String   , threads       :: Int
src/App/Commands/SyncFromArchive.hs view
@@ -13,7 +13,6 @@ import Antiope.Options.Applicative import App.Commands.Options.Parser      (text) import App.Commands.Options.Types       (SyncFromArchiveOptions (SyncFromArchiveOptions))-import App.Static                       (cabalDirectory) import Control.Applicative import Control.Lens                     hiding ((<.>)) import Control.Monad                    (unless, void, when)@@ -34,6 +33,7 @@ import System.Directory                 (createDirectoryIfMissing, doesDirectoryExist)  import qualified App.Commands.Options.Types                       as Z+import qualified App.Static                                       as AS import qualified Control.Concurrent.STM                           as STM import qualified Data.ByteString.Char8                            as C8 import qualified Data.ByteString.Lazy                             as LBS@@ -81,7 +81,7 @@   CIO.putStrLn $ "Threads: "          <> tshow threads   CIO.putStrLn $ "AWS Log level: "    <> tshow awsLogLevel -  mbPlan <- Z.loadPlan+  mbPlan <- Z.loadPlan $ opts ^. the @"buildPath"    case mbPlan of     Right planJson -> do@@ -214,10 +214,16 @@         )       )   <*> strOption+      (   long "build-path"+      <>  help ("Path to cabal build directory.  Defaults to " <> show AS.buildPath)+      <>  metavar "DIRECTORY"+      <>  value AS.buildPath+      )+  <*> strOption       (   long "store-path"-      <>  help "Path to cabal store"+      <>  help ("Path to cabal store.  Defaults to " <> show AS.cabalDirectory)       <>  metavar "DIRECTORY"-      <>  value (cabalDirectory </> "store")+      <>  value (AS.cabalDirectory </> "store")       )   <*> optional       ( strOption
src/App/Commands/SyncToArchive.hs view
@@ -14,7 +14,6 @@ import Antiope.Options.Applicative import App.Commands.Options.Parser      (text) import App.Commands.Options.Types       (SyncToArchiveOptions (SyncToArchiveOptions))-import App.Static                       (cabalDirectory) import Control.Applicative import Control.Lens                     hiding ((<.>)) import Control.Monad                    (filterM, unless, when)@@ -33,6 +32,7 @@ import System.Directory                 (doesDirectoryExist)  import qualified App.Commands.Options.Types         as Z+import qualified App.Static                         as AS import qualified Control.Concurrent.STM             as STM import qualified Data.ByteString.Lazy               as LBS import qualified Data.ByteString.Lazy.Char8         as LC8@@ -76,7 +76,8 @@    tEarlyExit <- STM.newTVarIO False -  mbPlan <- Z.loadPlan+  mbPlan <- Z.loadPlan $ opts ^. the @"buildPath"+   case mbPlan of     Right planJson -> do       compilerContextResult <- runExceptT $ Z.mkCompilerContext planJson@@ -172,13 +173,19 @@       (   long "archive-uri"       <>  help "Archive URI to sync to"       <>  metavar "S3_URI"-      <>  value (Local $ cabalDirectory </> "archive")+      <>  value (Local $ AS.cabalDirectory </> "archive")       )   <*> strOption+      (   long "build-path"+      <>  help ("Path to cabal build directory.  Defaults to " <> show AS.buildPath)+      <>  metavar "DIRECTORY"+      <>  value AS.buildPath+      )+  <*> strOption       (   long "store-path"       <>  help "Path to cabal store"       <>  metavar "DIRECTORY"-      <>  value (cabalDirectory </> "store")+      <>  value (AS.cabalDirectory </> "store")       )   <*> optional       ( strOption
src/App/Static.hs view
@@ -6,3 +6,6 @@  cabalDirectory :: FilePath cabalDirectory = if S.isPosix then P.cabalDirectory else W.cabalDirectory++buildPath :: FilePath+buildPath = "dist-newstyle"
src/HaskellWorks/CabalCache/Core.hs view
@@ -104,8 +104,8 @@         packages :: [Z.Package]         packages = planJson ^. the @"installPlan" -loadPlan :: IO (Either AppError Z.PlanJson)-loadPlan = (first fromString . eitherDecode) <$> LBS.readFile ("dist-newstyle" </> "cache" </> "plan.json")+loadPlan :: FilePath -> IO (Either AppError Z.PlanJson)+loadPlan buildPath = (first fromString . eitherDecode) <$> LBS.readFile (buildPath </> "cache" </> "plan.json")  ------------------------------------------------------------------------------- mkPackageInfo :: FilePath -> Z.CompilerId -> Z.Package -> IO PackageInfo