stackage-curator 0.14.1 → 0.14.1.1
raw patch · 6 files changed
+31/−13 lines, 6 filesdep −stackage-install
Dependencies removed: stackage-install
Files
- ChangeLog.md +4/−0
- Stackage/CompleteBuild.hs +5/−2
- Stackage/GhcPkg.hs +5/−2
- Stackage/PackageIndex.hs +4/−1
- Stackage/PerformBuild.hs +12/−6
- stackage-curator.cabal +1/−2
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.14.1.1++* Fix for latest nightly snapshot [#21](https://github.com/fpco/stackage-curator/issues/21)+ ## 0.14.1 * configure-args
Stackage/CompleteBuild.hs view
@@ -33,7 +33,7 @@ import Stackage.BuildPlan import Stackage.CheckBuildPlan import Stackage.PerformBuild-import Stackage.Prelude hiding (threadDelay, getNumCapabilities)+import Stackage.Prelude hiding (threadDelay, getNumCapabilities, Concurrently (..), withAsync) import Stackage.ServerBundle import Stackage.UpdateBuildPlan import Stackage.Upload@@ -272,7 +272,7 @@ hackageDistro planFile target = do man <- newManager tlsManagerSettings plan <- decodeFileEither planFile >>= either throwM return- ecreds <- tryIO $ readFile "/hackage-creds"+ ecreds <- tryIO' $ readFile "/hackage-creds" case map encodeUtf8 $ words $ decodeUtf8 $ either (const "") id ecreds of [username, password] -> do putStrLn $ "Uploading as Hackage distro: " ++ distroName@@ -524,3 +524,6 @@ -- | Check if the given target is already used in the Github repos checkTargetAvailable :: Target -> IO () checkTargetAvailable = void . checkoutRepo++tryIO' :: IO a -> IO (Either IOException a)+tryIO' = try
Stackage/GhcPkg.hs view
@@ -88,13 +88,16 @@ (CT.decodeUtf8 $= CT.lines $= CL.mapMaybe parseLibraryDir- $= CL.mapM_ (void . tryIO . removeTree . FP.decodeString))+ $= CL.mapM_ (void . tryIO' . removeTree . FP.decodeString)) void (readProcessWithExitCode "ghc-pkg" ("unregister": flags ++ ["--force", unpack $ display name]) "") - void $ tryIO $ removeTree $ FP.decodeString $ docDir </> unpack (display ident)+ void $ tryIO' $ removeTree $ FP.decodeString $ docDir </> unpack (display ident) where parseLibraryDir = fmap unpack . stripPrefix "library-dirs: "++ tryIO' :: IO a -> IO (Either IOException a)+ tryIO' = try
Stackage/PackageIndex.hs view
@@ -194,7 +194,7 @@ -> UnparsedCabalFile -> m SimplifiedPackageDescription ucfParse root (UnparsedCabalFile name version fp lbs _entry) = liftIO $ do- eres <- tryIO $ fmap Store.decode $ readFile cache+ eres <- tryIO' $ fmap Store.decode $ readFile cache case eres of Right (Right (Store.Tagged x)) -> return x _ -> do@@ -203,6 +203,9 @@ writeFile cache $ Store.encode $ Store.Tagged x return x where+ tryIO' :: IO a -> IO (Either IOException a)+ tryIO' = try+ -- location of the binary cache cache = root </> "cache" </> (unpack $ decodeUtf8 $ B16.encode $ SHA256.hashlazy lbs)
Stackage/PerformBuild.hs view
@@ -219,7 +219,7 @@ haddockFiles <- getHaddockFiles pb >>= newTVarIO haddockDeps <- newTVarIO mempty - forM_ packageMap $ \pi -> void $ async $ singleBuild pb registeredPackages+ forM_ packageMap $ \pi -> void $ Control.Concurrent.Async.async $ singleBuild pb registeredPackages SingleBuild { sbSem = sem , sbErrsVar = errsVar@@ -554,7 +554,7 @@ (childDir </> "dist" </> "doc" </> "html" </> unpack name) (pbDocDir pb </> unpack namever) - enewPath <- tryIO+ enewPath <- tryIO' $ canonicalizePath $ fromString $ pbDocDir pb@@ -684,7 +684,7 @@ renameOrCopy :: FilePath -> FilePath -> IO () renameOrCopy src dest = rename (fromString src) (fromString dest)- `catchIO` \_ -> copyDir src dest+ `catchIO'` \_ -> copyDir src dest copyBuiltInHaddocks :: FilePath -> IO () copyBuiltInHaddocks docdir = do@@ -745,7 +745,7 @@ getPreviousResult :: PerformBuild -> ResultType -> PackageIdentifier -> IO PrevResult getPreviousResult w x y = withPRPath w x y $ \fp -> do- eres <- tryIO $ readFile fp+ eres <- tryIO' $ readFile fp return $ case eres of Right bs | bs == successBS -> PRSuccess@@ -761,7 +761,7 @@ deletePreviousResults pb name = forM_ [minBound..maxBound] $ \rt -> withPRPath pb rt name $ \fp ->- void $ tryIO $ removeFile $ fromString fp+ void $ tryIO' $ removeFile $ fromString fp -- | Discover existing .haddock files in the docs directory getHaddockFiles :: PerformBuild -> IO (Map Text FilePath)@@ -855,7 +855,7 @@ else return gpd' let simple = buildType (packageDescription gpd) == Just Simple when simple $ do- _ <- tryIO $ removeFile $ fromString setuplhs+ _ <- tryIO' $ removeFile $ fromString setuplhs writeFile setuphs $ asByteString "import Distribution.Simple\nmain = defaultMain\n" return gpd where@@ -866,3 +866,9 @@ -- | Strip all version bounds from a GenericPackageDescription stripVersionBounds :: GenericPackageDescription -> GenericPackageDescription stripVersionBounds = everywhere $ mkT $ \(Dependency name _) -> Dependency name anyVersion++tryIO' :: IO a -> IO (Either IOException a)+tryIO' = try++catchIO' :: IO a -> (IOException -> IO a) -> IO a+catchIO' = catch
stackage-curator.cabal view
@@ -1,5 +1,5 @@ name: stackage-curator-version: 0.14.1+version: 0.14.1.1 synopsis: Tools for curating Stackage bundles description: Please see <http://www.stackage.org/package/stackage-curator> for a description and documentation. homepage: https://github.com/fpco/stackage-curator@@ -91,7 +91,6 @@ , cryptohash , cryptohash-conduit , resourcet- , stackage-install >= 0.1.1 , lucid , store , syb