[Git][ghc/ghc][wip/backports-9.12] 3 commits: gitlab-ci: Bump docker images
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Feb 19 19:51:48 UTC 2025
Ben Gamari pushed to branch wip/backports-9.12 at Glasgow Haskell Compiler / GHC
Commits:
3fc18149 by Ben Gamari at 2025-02-19T14:51:29-05:00
gitlab-ci: Bump docker images
Closes #25693.
(cherry picked from commit a566da926e6929d7c7f0f77b0fe519e5fe8250a7)
- - - - -
ffcf1202 by Ben Gamari at 2025-02-19T14:51:39-05:00
hadrian: Drop uses of head/tail
To silence warnings with GHC 9.10
(cherry picked from commit a7e23f01226fb690e0951edfe3c26d0cd96a3843)
- - - - -
4ef4b7b2 by Ben Gamari at 2025-02-19T14:51:40-05:00
hadrian: Disable x-data-list-nonempty-unzip warning
(cherry picked from commit 12752f0cfd8072cd6235f011bb22a5d3d6bc7dc6)
- - - - -
5 changed files:
- .gitlab-ci.yml
- hadrian/src/Hadrian/Utilities.hs
- hadrian/src/Oracles/ModuleFiles.hs
- hadrian/src/Rules/Dependencies.hs
- hadrian/src/Settings/Parser.hs
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
- DOCKER_REV: efc1ab81236eb37e20cb287ec77aebb6c6341098
+ DOCKER_REV: 94df7d589f0ded990826bc7a4d7f5a40d6055a4f
# Sequential version number of all cached things.
# Bump to invalidate GitLab CI cache.
=====================================
hadrian/src/Hadrian/Utilities.hs
=====================================
@@ -138,7 +138,10 @@ unifyPath = toStandard . normaliseEx
-- | Combine paths with a forward slash regardless of platform.
(-/-) :: FilePath -> FilePath -> FilePath
-_ -/- b | isAbsolute b && not (isAbsolute $ tail b) = b
+_ -/- b
+ | isAbsolute b
+ , _:b' <- b
+ , not (isAbsolute b') = b
"" -/- b = b
a -/- b
| last a == '/' = a ++ b
@@ -615,7 +618,8 @@ renderLibrary name lib synopsis = renderBox $
-- | ipsum |
-- \----------/
renderBox :: [String] -> String
-renderBox ls = tail $ concatMap ('\n' :) (boxTop : map renderLine ls ++ [boxBot])
+renderBox ls =
+ drop 1 $ concatMap ('\n' :) (boxTop : map renderLine ls ++ [boxBot])
where
-- Minimum total width of the box in characters
minimumBoxWidth = 32
=====================================
hadrian/src/Oracles/ModuleFiles.hs
=====================================
@@ -169,10 +169,12 @@ moduleFilesOracle = void $ do
let pairs = sort $ mainpairs ++ [ (encodeModule d f, f) | (fs, d) <- result, f <- fs ]
multi = [ (m, f1, f2) | (m, f1):(n, f2):_ <- tails pairs, m == n ]
- unless (null multi) $ do
- let (m, f1, f2) = head multi
- error $ "Module " ++ m ++ " has more than one source file: "
- ++ f1 ++ " and " ++ f2 ++ "."
+
+ case multi of
+ [] -> return ()
+ (m, f1, f2) : _ ->
+ fail $ "Module " ++ m ++ " has more than one source file: "
+ ++ f1 ++ " and " ++ f2 ++ "."
return $ lookupAll modules pairs
-- Optimisation: we discard Haskell files here, because they are never used
=====================================
hadrian/src/Rules/Dependencies.hs
=====================================
@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -Wno-deprecations #-}
+{-# OPTIONS_GHC -Wno-x-data-list-nonempty-unzip #-}
module Rules.Dependencies (buildPackageDependencies) where
=====================================
hadrian/src/Settings/Parser.hs
=====================================
@@ -184,14 +184,11 @@ instance Match SettingsM where
matchStringSettingsM :: String -> SettingsM ()
matchStringSettingsM s = do
ks <- State.get
- if null ks
- then throwError $ "expected " ++ show s ++ ", got nothing"
- else go (head ks)
-
- where go k
- | k == s = State.modify tail
- | otherwise = throwError $
- "expected " ++ show s ++ ", got " ++ show k
+ case ks of
+ [] -> throwError $ "expected " ++ show s ++ ", got nothing"
+ k:_
+ | k == s -> State.modify (drop 1)
+ | otherwise -> throwError $ "expected " ++ show s ++ ", got " ++ show k
matchOneOfSettingsM :: [SettingsM a] -> SettingsM a
matchOneOfSettingsM acts = StateT $ \k -> do
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d17ff3f020fac37ce695027d51d13f81a4688782...4ef4b7b2593c7ae22b588d163d60258b5e2e323b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d17ff3f020fac37ce695027d51d13f81a4688782...4ef4b7b2593c7ae22b588d163d60258b5e2e323b
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/20250219/8de91485/attachment-0001.html>
More information about the ghc-commits
mailing list