[commit: ghc] wip/nfs-locking: Drop ghc-cabal resource. (13d735f)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:16:57 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/13d735f298d0a51a83c422a34e9844058ca5e89d/ghc
>---------------------------------------------------------------
commit 13d735f298d0a51a83c422a34e9844058ca5e89d
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Wed Feb 3 01:03:46 2016 +0000
Drop ghc-cabal resource.
See #200.
>---------------------------------------------------------------
13d735f298d0a51a83c422a34e9844058ca5e89d
src/Rules/Data.hs | 3 +--
src/Rules/Resources.hs | 10 +++-------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index f2e3d43..ade93fd 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -41,8 +41,7 @@ buildPackageData rs target @ (PartialTarget stage pkg) = do
let inTreeMk = oldPath -/- takeFileName dataFile
need [cabalFile]
- buildWithResources [(resGhcCabal rs, 1)] $
- fullTarget target GhcCabal [cabalFile] [inTreeMk]
+ build $ fullTarget target GhcCabal [cabalFile] [inTreeMk]
-- TODO: get rid of this, see #113
liftIO $ IO.copyFile inTreeMk dataFile
diff --git a/src/Rules/Resources.hs b/src/Rules/Resources.hs
index 514a222..d5e58fe 100644
--- a/src/Rules/Resources.hs
+++ b/src/Rules/Resources.hs
@@ -4,13 +4,9 @@ import Base
data Resources = Resources
{
- resGhcCabal :: Resource,
- resGhcPkg :: Resource
+ resGhcPkg :: Resource
}
--- Unfortunately parallel invokations of ghc-cabal or ghc-pkg do not work:
--- * https://mail.haskell.org/pipermail/ghc-commits/2013-May/001712.html
--- * ghc.mk: see comment about parallel ghc-pkg invokations
+-- We cannot register multiple packages in parallel:
resourceRules :: Rules Resources
-resourceRules = liftM2 Resources (newResource "ghc-cabal" 1)
- (newResource "ghc-pkg" 1)
+resourceRules = Resources <$> newResource "ghc-pkg" 1
More information about the ghc-commits
mailing list