[Git][ghc/ghc][wip/ghc-8.8-merges] 2 commits: Bump Cabal submodule

Ben Gamari gitlab at gitlab.haskell.org
Sun Jun 9 17:54:33 UTC 2019



Ben Gamari pushed to branch wip/ghc-8.8-merges at Glasgow Haskell Compiler / GHC


Commits:
ff438786 by Ben Gamari at 2019-06-09T17:54:25Z
Bump Cabal submodule

- - - - -
983ada70 by Ben Gamari at 2019-06-09T17:54:25Z
Bump binary to 0.8.7.0

- - - - -


10 changed files:

- hadrian/hadrian.cabal
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- libraries/Cabal
- libraries/binary
- testsuite/tests/driver/T4437.hs
- utils/check-api-annotations/check-api-annotations.cabal
- utils/check-ppr/check-ppr.cabal
- utils/ghc-cabal/Main.hs
- utils/ghc-cabal/ghc-cabal.cabal
- utils/ghctags/ghctags.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 27fc0fe9608ba502ef62647629a6d4ebe01fa33d
+Subproject commit f697d3209990c3314efe840be54fb7c5a967e6ff


=====================================
libraries/binary
=====================================
@@ -1 +1 @@
-Subproject commit 94855814e2e4f7a0f191ffa5b4c98ee0147e3174
+Subproject commit fcd9d3cb2a942c54347d28bcb80a1b46d2d7d673


=====================================
testsuite/tests/driver/T4437.hs
=====================================
@@ -38,9 +38,8 @@ check title expected got
 expectedGhcOnlyExtensions :: [String]
 expectedGhcOnlyExtensions = ["RelaxedLayout",
                              "AlternativeLayoutRule",
-                             "AlternativeLayoutRuleTransitional",
-                             "EmptyDataDeriving",
-                             "GeneralisedNewtypeDeriving"]
+                             "AlternativeLayoutRuleTransitional"
+                            ]
 
 expectedCabalOnlyExtensions :: [String]
 expectedCabalOnlyExtensions = ["Generics",


=====================================
utils/check-api-annotations/check-api-annotations.cabal
=====================================
@@ -24,6 +24,6 @@ Executable check-api-annotations
 
     Build-Depends: base       >= 4   && < 5,
                    containers,
-                   Cabal      >= 2.5 && < 2.6,
+                   Cabal      >= 3.0 && < 3.1,
                    directory,
                    ghc


=====================================
utils/check-ppr/check-ppr.cabal
=====================================
@@ -25,7 +25,7 @@ Executable check-ppr
     Build-Depends: base       >= 4   && < 5,
                    bytestring,
                    containers,
-                   Cabal      >= 2.5 && < 2.6,
+                   Cabal      >= 3.0 && < 3.1,
                    directory,
                    filepath,
                    ghc


=====================================
utils/ghc-cabal/Main.hs
=====================================
@@ -19,8 +19,10 @@ import Distribution.Simple.Utils (defaultPackageDesc, findHookedPackageDesc, wri
                                   toUTF8LBS)
 import Distribution.Simple.Build (writeAutogenFiles)
 import Distribution.Simple.Register
+import qualified Distribution.Compat.Graph as Graph
 import Distribution.Text
 import Distribution.Types.MungedPackageId
+import Distribution.Types.LocalBuildInfo
 import Distribution.Verbosity
 import qualified Distribution.InstalledPackageInfo as Installed
 import qualified Distribution.Simple.PackageIndex as PackageIndex
@@ -251,6 +253,18 @@ updateInstallDirTemplates relocatableBuild myPrefix myLibdir myDocdir idts
           htmldir   = toPathTemplate "$docdir"
       }
 
+externalPackageDeps :: LocalBuildInfo -> [(UnitId, MungedPackageId)]
+externalPackageDeps lbi =
+    -- TODO:  what about non-buildable components?
+    nub [ (ipkgid, pkgid)
+        | clbi            <- Graph.toList (componentGraph lbi)
+        , (ipkgid, pkgid) <- 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) . componentUnitId) (Graph.toList (componentGraph lbi))
+
 generate :: FilePath -> FilePath -> [String] -> IO ()
 generate directory distdir config_args
  = withCurrentDirectory directory
@@ -274,8 +288,8 @@ generate directory distdir config_args
               -- cabal 2.2+ will expect it, but fallback to the old default
               -- location if we don't find any.  This is the case of the
               -- bindist, which doesn't ship the $dist/build folder.
-              maybe_infoFile <- findHookedPackageDesc (cwd </> distdir </> "build")
-                                <|> defaultHookedPackageDesc
+              maybe_infoFile <- findHookedPackageDesc verbosity (cwd </> distdir </> "build")
+                                <|> fmap Just (defaultPackageDesc verbosity)
               case maybe_infoFile of
                   Nothing       -> return emptyHookedBuildInfo
                   Just infoFile -> readHookedBuildInfo verbosity infoFile
@@ -307,8 +321,9 @@ generate directory distdir config_args
 
       let
           comp = compiler lbi
-          libBiModules lib = (libBuildInfo lib, libModules lib)
+          libBiModules lib = (libBuildInfo lib, foldMap (allLibModules lib) (componentNameCLBIs lbi $ CLibName defaultLibName))
           exeBiModules exe = (buildInfo exe, ModuleName.main : exeModules exe)
+          biModuless :: [(BuildInfo, [ModuleName.ModuleName])]
           biModuless = (map libBiModules . maybeToList $ library pd)
                     ++ (map exeBiModules $ executables pd)
           buildableBiModuless = filter isBuildable biModuless


=====================================
utils/ghc-cabal/ghc-cabal.cabal
=====================================
@@ -21,7 +21,7 @@ Executable ghc-cabal
 
     Build-Depends: base       >= 3   && < 5,
                    bytestring >= 0.10 && < 0.11,
-                   Cabal      >= 2.5 && < 2.6,
+                   Cabal      >= 3.0 && < 3.1,
                    directory  >= 1.1 && < 1.4,
                    filepath   >= 1.2 && < 1.5
 


=====================================
utils/ghctags/ghctags.cabal
=====================================
@@ -18,6 +18,6 @@ Executable ghctags
 
     Build-Depends: base       >= 4   && < 5,
                    containers,
-                   Cabal      >= 2.5 && <2.6,
+                   Cabal      >= 3.0 && <3.1,
                    ghc
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d37edd155084161af69741af887be8075234b9d1...983ada70a013c7642a751f6e41587ff95b57d0f8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d37edd155084161af69741af887be8075234b9d1...983ada70a013c7642a751f6e41587ff95b57d0f8
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/20190609/c845dca9/attachment-0001.html>


More information about the ghc-commits mailing list