Commit ae6b6276 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by Marge Bot

Update to Cabal submodule to v3.2.0.0-alpha3

Metric Increase:
    haddock.Cabal
parent d561c8f6
Pipeline #14216 passed with stages
in 403 minutes and 16 seconds
Subproject commit 63331c95ed15cc7e3d83850d308dc3a86a8c3c76
Subproject commit b9253565ccf2fe4ad0124ca5a97a595edc1fbff6
......@@ -36,13 +36,11 @@ check title expected got
-- See Note [Adding a language extension] in compiler/main/DynFlags.hs.
expectedGhcOnlyExtensions :: [String]
expectedGhcOnlyExtensions = ["RelaxedLayout",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional",
"UnliftedNewtypes",
"CUSKs",
"StandaloneKindSignatures",
"ImportQualifiedPost"]
expectedGhcOnlyExtensions =
[ "RelaxedLayout"
, "AlternativeLayoutRule"
, "AlternativeLayoutRuleTransitional"
]
expectedCabalOnlyExtensions :: [String]
expectedCabalOnlyExtensions = ["Generics",
......
......@@ -24,6 +24,6 @@ Executable check-api-annotations
Build-Depends: base >= 4 && < 5,
containers,
Cabal >= 3.0 && < 3.2,
Cabal >= 3.0 && < 3.4,
directory,
ghc
......@@ -25,7 +25,7 @@ Executable check-ppr
Build-Depends: base >= 4 && < 5,
bytestring,
containers,
Cabal >= 3.0 && < 3.2,
Cabal >= 3.0 && < 3.4,
directory,
filepath,
ghc
......@@ -26,6 +26,7 @@ import Distribution.Types.LocalBuildInfo
import Distribution.Verbosity
import qualified Distribution.InstalledPackageInfo as Installed
import qualified Distribution.Simple.PackageIndex as PackageIndex
import Distribution.Utils.ShortText (fromShortText)
import Control.Exception (bracket)
import Control.Monad
......@@ -430,7 +431,7 @@ generate directory distdir config_args
variablePrefix ++ "_COMPONENT_ID = " ++ localCompatPackageKey lbi,
variablePrefix ++ "_MODULES = " ++ unwords mods,
variablePrefix ++ "_HIDDEN_MODULES = " ++ unwords otherMods,
variablePrefix ++ "_SYNOPSIS =" ++ (unwords $ lines $ synopsis pd),
variablePrefix ++ "_SYNOPSIS =" ++ (unwords $ lines $ fromShortText $ synopsis pd),
variablePrefix ++ "_HS_SRC_DIRS = " ++ unwords (hsSourceDirs bi),
variablePrefix ++ "_DEPS = " ++ unwords deps,
variablePrefix ++ "_DEP_IPIDS = " ++ unwords dep_ipids,
......@@ -474,9 +475,9 @@ generate directory distdir config_args
]
writeFile (distdir ++ "/package-data.mk") $ unlines xs
writeFileUtf8 (distdir ++ "/haddock-prologue.txt") $
if null (description pd) then synopsis pd
else description pd
writeFileUtf8 (distdir ++ "/haddock-prologue.txt") $ fromShortText $
if null (fromShortText $ description pd) then synopsis pd
else description pd
where
escape = foldr (\c xs -> if c == '#' then '\\':'#':xs else c:xs) []
wrap = mapM wrap1
......
......@@ -21,6 +21,6 @@ Executable ghc-cabal
Build-Depends: base >= 3 && < 5,
bytestring >= 0.10 && < 0.11,
Cabal >= 3.0 && < 3.2,
Cabal >= 3.0 && < 3.4,
directory >= 1.1 && < 1.4,
filepath >= 1.2 && < 1.5
......@@ -23,9 +23,9 @@ CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)"
# macros is triggered by `-hide-all-packages`, so we have to explicitly
# enumerate all packages we need in scope.
ifeq "$(Windows_Host)" "YES"
CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory Win32
CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory filepath Win32
else
CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory unix
CABAL_BUILD_DEPS := ghc-prim base array transformers time containers bytestring deepseq process pretty directory filepath unix
endif
ghc-cabal_DIST_BINARY_NAME = ghc-cabal$(exeext0)
......
......@@ -83,6 +83,7 @@ import qualified Data.Foldable as F
import qualified Data.Traversable as F
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Data.ByteString as BS
#if defined(mingw32_HOST_OS)
import GHC.ConsoleHandler
......@@ -948,7 +949,7 @@ readParseDatabase verbosity mb_user_conf mode use_cache path
parseSingletonPackageConf :: Verbosity -> FilePath -> IO InstalledPackageInfo
parseSingletonPackageConf verbosity file = do
when (verbosity > Normal) $ infoLn ("reading package config: " ++ file)
readUTF8File file >>= fmap fst . parsePackageInfo
BS.readFile file >>= fmap fst . parsePackageInfo
cachefilename :: FilePath
cachefilename = "package.cache"
......@@ -1143,7 +1144,7 @@ registerPackage input verbosity my_flags multi_instance
expanded <- if expand_env_vars then expandEnvVars s force
else return s
(pkg, ws) <- parsePackageInfo expanded
(pkg, ws) <- parsePackageInfo $ toUTF8BS expanded
when (verbosity >= Normal) $
infoLn "done."
......@@ -1177,7 +1178,7 @@ registerPackage input verbosity my_flags multi_instance
changeDB verbosity (removes ++ [AddPackage pkg]) db_to_operate_on db_stack
parsePackageInfo
:: String
:: BS.ByteString
-> IO (InstalledPackageInfo, [ValidateWarning])
parsePackageInfo str =
case parseInstalledPackageInfo str of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment