From a4016e3d2ca90bfdc5917cff521dc1fbe6bef7cb Mon Sep 17 00:00:00 2001 From: Shayne Fletcher Date: Mon, 16 Dec 2024 08:05:17 -0500 Subject: [PATCH] ghc-9.12.1 release --- CI.hs | 12 ++++++------ ghc-lib-gen/src/Ghclibgen.hs | 26 +++++++++++++++++++------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CI.hs b/CI.hs index 63f640a9..27bba21b 100755 --- a/CI.hs +++ b/CI.hs @@ -99,7 +99,7 @@ data DaFlavor = DaFlavor -- Last tested gitlab.haskell.org/ghc/ghc.git at current :: String -current = "caaf53881d5cc82ebff617f39ad5363429d2eccf" -- 2024-11-25 +current = "bfacc086604c18e30758772a05a8c81e3a4e01bc" -- 2024-12-16 ghcFlavorOpt :: GhcFlavor -> String ghcFlavorOpt = \case @@ -349,13 +349,13 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix = do pkg_ghclib_parser = "ghc-lib-parser-" ++ version ghcFlavorArg = ghcFlavorOpt ghcFlavor - system_ "cabal build exe:ghc-lib-gen" - system_ $ "cabal run exe:ghc-lib-gen -- ghc ../patches --ghc-lib-parser " ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor + system_ "cabal build --allow-newer=\"hashable:base,unordered-containers:template-haskell\" exe:ghc-lib-gen" + system_ $ "cabal run --allow-newer=\"hashable:base,unordered-containers:template-haskell\" exe:ghc-lib-gen -- ghc ../patches --ghc-lib-parser " ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor patchVersion version "ghc/ghc-lib-parser.cabal" mkTarball pkg_ghclib_parser renameDirectory pkg_ghclib_parser "ghc-lib-parser" removeFile "ghc/ghc-lib-parser.cabal" - system_ $ "cabal run exe:ghc-lib-gen -- ghc ../patches --ghc-lib " ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor ++ " --skip-init" + system_ $ "cabal run --allow-newer=\"hashable:base,unordered-containers:template-haskell\" exe:ghc-lib-gen -- ghc ../patches --ghc-lib " ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor ++ " --skip-init" patchVersion version "ghc/ghc-lib.cabal" patchConstraints version "ghc/ghc-lib.cabal" mkTarball pkg_ghclib @@ -422,7 +422,7 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix = do writeCabalCmdFile :: String -> IO () writeCabalCmdFile exe = do let filename = exe - cmd = "cabal run exe:" ++ exe ++ " --project-dir ../.. -- " + cmd = "cabal -v0 run exe:" ++ exe ++ " --project-dir ../.. -- " writeFile filename cmd cmd :: String -> IO () @@ -498,7 +498,7 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix = do branch :: GhcFlavor -> String branch = \case - Ghc9121 -> "ghc-9.12" + Ghc9121 -> "ghc-9.12.1-release" Ghc9101 -> "ghc-9.10.1-release" Ghc984 -> "ghc-9.8.4-release" Ghc983 -> "ghc-9.8.3-release" diff --git a/ghc-lib-gen/src/Ghclibgen.hs b/ghc-lib-gen/src/Ghclibgen.hs index 7107b159..196cfea4 100644 --- a/ghc-lib-gen/src/Ghclibgen.hs +++ b/ghc-lib-gen/src/Ghclibgen.hs @@ -279,7 +279,7 @@ ghcNumericVersion = do cabalPackageDb :: String -> IO String cabalPackageDb ghcNumericVersion = do - cabalStoreDir <- replace "\\" "\\\\" <$> systemOutput_ "cabal path --store-dir" + cabalStoreDir <- replace "\\" "\\\\" <$> systemOutput_ "cabal -v0 path --store-dir" ghcInfo <- getGhcInfo let ghcInfoMap = Map.fromList ghcInfo let ghcDir = @@ -1198,12 +1198,12 @@ baseBounds = \case Ghc984 -> "base >= 4.17 && < 4.20" -- [ghc-9.4.1, ghc-9.10.1) -- base-4.20.0.0 Ghc9101 -> "base >= 4.18 && < 4.21" -- [ghc-9.6.1, ghc-9.12.1) - -- base-4.20.0.0 TODO bump - Ghc9121 -> "base >= 4.18 && < 4.21" -- [ghc-9.6.1, ghc-9.12.1) + -- base-4.21.0.0 TODO bump + Ghc9121 -> "base >= 4.19 && < 4.22" -- [ghc-9.8.1, ghc-9.14.1) GhcMaster -> -- e.g. "9.11.20230119" -- (c.f. 'rts/include/ghcversion.h') - "base >= 4.18 && < 4.21" -- [ghc-9.6.1, ghc-9.12.1) + "base >= 4.19 && < 4.22" -- [ghc-9.8.1, ghc-9.14.1) -- Common build dependencies. commonBuildDepends :: GhcFlavor -> Data.List.NonEmpty.NonEmpty String @@ -1214,7 +1214,7 @@ commonBuildDepends ghcFlavor = base = [baseBounds ghcFlavor] specific | ghcSeries ghcFlavor >= GHC_9_12 = - [ "ghc-prim > 0.2 && < 0.12", + [ "ghc-prim > 0.2 && < 0.14", "containers >= 0.6.2.1 && < 0.8", "bytestring >= 0.11.4 && < 0.13", "time >= 1.4 && < 1.15", @@ -1308,7 +1308,11 @@ libBinParserLibModules ghcFlavor = do return (lib, [bin], parserModules, libModules) where keptGhcInternalModules :: [String] +#if __GLASGOW_HASKELL__ >= 912 + keptGhcInternalModules = [] +#else keptGhcInternalModules = ["GHC.Internal.ForeignSrcLang", "GHC.Internal.LanguageExtensions", "GHC.Internal.Lexeme", "GHC.Internal.TH.Syntax", "GHC.Internal.TH.Ppr", "GHC.Internal.TH.PprLib", "GHC.Internal.TH.Lib.Map"] +#endif filterGhcInternalModules :: [String] -> [String] filterGhcInternalModules mods = @@ -1546,12 +1550,20 @@ generatePrerequisites ghcFlavor = do =<< readFile' "./mk/get-win32-tarballs.sh" ) + -- When there is a new GHC release it takes time for package bounds + -- to get updated. +#if __GLASGOW_HASKELL__ < 912 + let hadrianExtraCabalFlags = "" +#else + let hadrianExtraCabalFlags = "--allow-newer " +#endif + system_ "bash -c ./boot" system_ "bash -c \"./configure --enable-tarballs-autodownload\"" withCurrentDirectory "hadrian" $ do - system_ "cabal build exe:hadrian --ghc-options=-j" + system_ $ "cabal build " ++ hadrianExtraCabalFlags ++ "exe:hadrian --ghc-options=-j" system_ . unwords . join $ - [ [ "cabal run exe:hadrian --", + [ [ "cabal run " ++ hadrianExtraCabalFlags ++ "exe:hadrian --", "--directory=..", "--build-root=ghc-lib" ],