From 4b648be19c75e6c6a8e6f9f93fa12c7a4176f0ae Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 23 Sep 2014 16:05:25 +0200 Subject: Update Cabal submodule & ghc-pkg to use new module re-export types Summary: The main change is that Cabal changed the representation of module re-exports to distinguish reexports in source .cabal files versus re-exports in installed package registraion files. Cabal now also does the resolution of re-exports to specific installed packages itself, so ghc-pkg no longer has to do this. This is a cleaner design overall because re-export resolution can fail so it is better to do it during package configuration rather than package registration. It also simplifies the re-export representation that ghc-pkg has to use. Add extra ghc-pkg sanity check for module re-exports and duplicates For re-exports, check that the defining package exists and that it exposes the defining module (or for self-rexport exposed or hidden modules). Also check that the defining package is actually a direct or indirect dependency of the package doing the re-exporting. Also add a check for duplicate modules in a package, including re-exported modules. Test Plan: So far the sanity checks are totally untested. Should add some test case to make sure the sanity checks do catch things correctly, and don't ban legal things. Reviewers: austin, duncan Subscribers: angerman, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D183 GHC Trac Issues: --- utils/ghc-cabal/Main.hs | 2 +- utils/ghc-cabal/ghc.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'utils/ghc-cabal') diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 47eb1de4fd..bf08912c74 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -347,7 +347,7 @@ generate directory distdir dll0Modules config_args do cwd <- getCurrentDirectory let ipid = InstalledPackageId (display (packageId pd) ++ "-inplace") let installedPkgInfo = inplaceInstalledPackageInfo cwd distdir - pd lib lbi clbi + pd ipid lib lbi clbi final_ipi = installedPkgInfo { Installed.installedPackageId = ipid, Installed.haddockHTMLs = [] diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index ff5762a655..b8d54abfcb 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -42,6 +42,7 @@ $(ghc-cabal_DIST_BINARY): utils/ghc-cabal/Main.hs $(TOUCH_DEP) | $$(dir $$@)/. b -odir bootstrapping \ -hidir bootstrapping \ -ilibraries/Cabal/Cabal \ + -ilibraries/binary/src -DGENERICS \ -ilibraries/filepath \ -ilibraries/hpc \ $(utils/ghc-cabal_dist_EXTRA_HC_OPTS) -- cgit v1.2.1