[Git][ghc/ghc][master] 3 commits: libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Dec 6 21:17:32 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
36b9a38c by Matthew Pickering at 2023-12-06T16:15:21-05:00
libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0

Updates filepath submodule
Updates unix submodule

Fixes #24240

- - - - -
91ff0971 by Matthew Pickering at 2023-12-06T16:15:21-05:00
Submodule linter: Allow references to tags

We modify the submodule linter so that if the bumped commit is a
specific tag then the commit is accepted.

Fixes #24241

- - - - -
86f652dc by Zubin Duggal at 2023-12-06T16:15:21-05:00
hadrian: set -Wno-deprecations for directory and Win32

The filepath bump to 1.4.200.1 introduces a deprecation warning.

See https://gitlab.haskell.org/ghc/ghc/-/issues/24240
    https://github.com/haskell/filepath/pull/206

- - - - -


5 changed files:

- hadrian/src/Settings/Warnings.hs
- libraries/filepath
- libraries/unix
- linters/lint-submodule-refs/Main.hs
- linters/linters-common/Linters/Common.hs


Changes:

=====================================
hadrian/src/Settings/Warnings.hs
=====================================
@@ -35,7 +35,9 @@ ghcWarningsArgs = do
         , package binary       ? pure [ "-Wno-deprecations" ]
         , package bytestring   ? pure [ "-Wno-inline-rule-shadowing" ]
         , package compiler     ? pure [ "-Wcpp-undef" ]
-        , package directory    ? pure [ "-Wno-unused-imports" ]
+        , package directory    ? pure [ "-Wno-unused-imports"
+                                      , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240
+                                      ]
         , package ghc          ? pure [ "-Wcpp-undef"
                                       , "-Wincomplete-uni-patterns"
                                       , "-Wincomplete-record-updates"
@@ -60,5 +62,7 @@ ghcWarningsArgs = do
                                       , "-Wno-redundant-constraints"
                                       , "-Wno-orphans" ]
         , package unix         ? pure [ "-Wno-deprecations" ]
-        , package win32        ? pure [ "-Wno-trustworthy-safe" ]
+        , package win32        ? pure [ "-Wno-trustworthy-safe"
+                                      , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240
+                                      ]
         , package xhtml        ? pure [ "-Wno-unused-imports" ] ] ]


=====================================
libraries/filepath
=====================================
@@ -1 +1 @@
-Subproject commit 367f6bffc158ef1a9055fb876e23447636853aa4
+Subproject commit cdb5171f7774569b1a8028a78392cfa79f732b5c


=====================================
libraries/unix
=====================================
@@ -1 +1 @@
-Subproject commit 5211c230903aee8c09485e8246993e2a1eb74563
+Subproject commit 0b3dbc9901fdf2d752c4ee7a7cee7b1ed20e76bd


=====================================
linters/lint-submodule-refs/Main.hs
=====================================
@@ -18,12 +18,12 @@ import           System.Exit
 -- text
 import qualified Data.Text    as T
 import qualified Data.Text.IO as T
-  ( putStrLn )
+  ( putStrLn, putStr )
 
 -- linters-common
 import           Linters.Common
   ( GitType(..)
-  , gitBranchesContain, gitCatCommit, gitDiffTree, gitNormCid
+  , gitBranchesContain, gitIsTagged, gitCatCommit, gitDiffTree, gitNormCid
   )
 
 --------------------------------------------------------------------------------
@@ -51,16 +51,18 @@ main = do
               exitWith (ExitFailure 1)
 
           bad <- fmap or $ forM smDeltas $ \(smPath,smCid) -> do
-              T.putStrLn $ " - " <> smPath <> " => " <> smCid
+              T.putStr $ " - " <> smPath <> " => " <> smCid
 
               let smAbsPath = dir ++ "/" ++ T.unpack smPath
               remoteBranches <- gitBranchesContain smAbsPath smCid
+              isTagged <- gitIsTagged smAbsPath smCid
 
               let (wip, nonWip) = partition ("wip/" `T.isPrefixOf`) originBranches
                   originBranches = mapMaybe isOriginTracking remoteBranches
                   isOriginTracking = T.stripPrefix "origin/"
-              let bad = null nonWip
-              when bad $ do
+              case (nonWip ++ isTagged) of
+                [] -> do
+                  T.putStrLn " ... BAD"
                   T.putStrLn $     "   *FAIL* commit not found in submodule repo"
                   T.putStrLn       "          or not reachable from persistent branches"
                   T.putStrLn       ""
@@ -70,8 +72,15 @@ main = do
                       commit <- gitNormCid smAbsPath ("origin/" <> branch)
                       T.putStrLn $ "      - " <> branch <> " -> " <> commit
                     T.putStrLn ""
-              pure bad
+                  return True
+                (b:bs) -> do
+                  let more = case bs of
+                                [] -> ")"
+                                rest -> " and " <> T.pack (show (length rest)) <> " more)"
+                  T.putStrLn $ "... OK (" <>  b <> more
+                  return False
 
           if bad
             then exitWith (ExitFailure 1)
-            else T.putStrLn " OK"
+            else T.putStrLn "OK"
+


=====================================
linters/linters-common/Linters/Common.hs
=====================================
@@ -1,6 +1,7 @@
 {-# LANGUAGE BangPatterns #-}
 {-# LANGUAGE DerivingStrategies #-}
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 
 {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
 
@@ -105,6 +106,10 @@ gitBranchesContain d ref = do
 
     return $!! map (T.drop 2) tmp
 
+gitIsTagged :: FilePath -> GitRef -> Sh [Text]
+gitIsTagged d ref =
+  T.lines <$> runGit d "tag" ["--points-at", ref]
+
 -- | returns @[(path, (url, key))]@
 --
 -- may throw exception



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/10a1a6c635dcd8b3db5ef8bb7195717a75ebb935...86f652dc9a649e59e643609c287a510a565f5408

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/10a1a6c635dcd8b3db5ef8bb7195717a75ebb935...86f652dc9a649e59e643609c287a510a565f5408
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/20231206/82761e3e/attachment-0001.html>


More information about the ghc-commits mailing list