[Git][ghc/ghc][wip/ghc-8.8-merges] Bump Cabal
Ben Gamari
gitlab at gitlab.haskell.org
Fri Jun 7 14:31:38 UTC 2019
Ben Gamari pushed to branch wip/ghc-8.8-merges at Glasgow Haskell Compiler / GHC
Commits:
183dcc5e by Ben Gamari at 2019-06-07T14:31:10Z
Bump Cabal
- - - - -
3 changed files:
- hadrian/hadrian.cabal
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- libraries/Cabal
Changes:
=====================================
hadrian/hadrian.cabal
=====================================
@@ -116,7 +116,7 @@ executable hadrian
other-extensions: MultiParamTypeClasses
, TypeFamilies
build-depends: base >= 4.8 && < 5
- , Cabal >= 2.5 && < 2.6
+ , Cabal >= 3.0 && < 3.1
, containers >= 0.5 && < 0.7
, directory >= 1.2 && < 1.4
, extra >= 1.4.7
=====================================
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
=====================================
@@ -1,4 +1,3 @@
-{-# OPTIONS_GHC -Wno-deprecations #-}
-----------------------------------------------------------------------------
-- |
-- Module : Hadrian.Haskell.Cabal.Parse
@@ -17,6 +16,7 @@ module Hadrian.Haskell.Cabal.Parse (
import Data.Bifunctor
import Data.List.Extra
import Development.Shake
+import qualified Distribution.Compat.Graph as Graph
import qualified Distribution.ModuleName as C
import qualified Distribution.Package as C
import qualified Distribution.PackageDescription as C
@@ -30,6 +30,7 @@ import qualified Distribution.Simple.Utils as C
import qualified Distribution.Simple.Program.Types as C
import qualified Distribution.Simple.Configure as C (getPersistBuildConfig)
import qualified Distribution.Simple.Build as C
+import qualified Distribution.Types.ComponentLocalBuildInfo as C
import qualified Distribution.Types.ComponentRequestedSpec as C
import qualified Distribution.InstalledPackageInfo as Installed
import qualified Distribution.Simple.PackageIndex as C
@@ -215,7 +216,7 @@ resolveContextData context at Context {..} = do
-- TODO: Get rid of deprecated 'externalPackageDeps' and drop -Wno-deprecations
-- See: https://github.com/snowleopard/hadrian/issues/548
- let extDeps = C.externalPackageDeps lbi'
+ let extDeps = externalPackageDeps lbi'
deps = map (C.display . snd) extDeps
depDirect = map (fromMaybe (error "resolveContextData: depDirect failed")
. C.lookupUnitId (C.installedPkgs lbi') . fst) extDeps
@@ -288,7 +289,20 @@ resolveContextData context at Context {..} = do
getHookedBuildInfo :: [FilePath] -> IO C.HookedBuildInfo
getHookedBuildInfo [] = return C.emptyHookedBuildInfo
getHookedBuildInfo (baseDir:baseDirs) = do
- maybeInfoFile <- C.findHookedPackageDesc baseDir
+ maybeInfoFile <- C.findHookedPackageDesc C.normal baseDir
case maybeInfoFile of
Nothing -> getHookedBuildInfo baseDirs
Just infoFile -> C.readHookedBuildInfo C.silent infoFile
+
+externalPackageDeps :: C.LocalBuildInfo -> [(C.UnitId, C.MungedPackageId)]
+externalPackageDeps lbi =
+ -- TODO: what about non-buildable components?
+ nub [ (ipkgid, pkgid)
+ | clbi <- Graph.toList (C.componentGraph lbi)
+ , (ipkgid, pkgid) <- C.componentPackageDeps clbi
+ , not (internal ipkgid) ]
+ where
+ -- True if this dependency is an internal one (depends on the library
+ -- defined in the same package).
+ internal ipkgid = any ((==ipkgid) . C.componentUnitId) (Graph.toList (C.componentGraph lbi))
+
=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit 15675844bb36929448c189d6b4aabf7e853b3ee1
+Subproject commit f697d3209990c3314efe840be54fb7c5a967e6ff
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/183dcc5e2a8e779fc2871b0e78ea7e0fe7fbaed5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/183dcc5e2a8e779fc2871b0e78ea7e0fe7fbaed5
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190607/50a03f22/attachment-0001.html>
More information about the ghc-commits
mailing list