[commit: ghc] wip/nfs-locking: Fix missing dependencies for Stage2 packages (2c74f92)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:33:05 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/2c74f92cc3db93f71f294e4f0797a1866950467c/ghc
>---------------------------------------------------------------
commit 2c74f92cc3db93f71f294e4f0797a1866950467c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sat May 21 02:23:31 2016 +0100
Fix missing dependencies for Stage2 packages
Fix #240.
>---------------------------------------------------------------
2c74f92cc3db93f71f294e4f0797a1866950467c
src/Rules/Cabal.hs | 2 +-
src/Rules/Data.hs | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Rules/Cabal.hs b/src/Rules/Cabal.hs
index 05078fc..82edb3a 100644
--- a/src/Rules/Cabal.hs
+++ b/src/Rules/Cabal.hs
@@ -28,7 +28,7 @@ cabalRules = do
-- Cache package dependencies
packageDependencies %> \out -> do
- pkgs <- interpretInContext (stageContext Stage1) getPackages
+ let pkgs = knownPackages \\ [hp2ps, libffi, touchy, unlit]
pkgDeps <- forM (sort pkgs) $ \pkg ->
if pkg == rts
then return $ pkgNameString pkg
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 8512c3a..2ecfb37 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -31,10 +31,12 @@ buildPackageData context at Context {..} = do
whenM (doesFileExist $ configure <.> "ac") $ need [configure]
-- Before we configure a package its dependencies need to be registered
+ let depStage = min stage Stage1 -- dependencies come from Stage0/1
+ depContext = vanillaContext depStage
deps <- packageDeps package
- pkgs <- interpretInContext context getPackages
+ pkgs <- interpretInContext (depContext package) getPackages
let depPkgs = matchPackageNames (sort pkgs) deps
- need =<< traverse (pkgConfFile . vanillaContext stage) depPkgs
+ need =<< traverse (pkgConfFile . depContext) depPkgs
need [cabalFile]
build $ Target context GhcCabal [cabalFile] [mk]
More information about the ghc-commits
mailing list