Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package shake for openSUSE:Factory checked 
in at 2021-01-20 18:26:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shake (Old)
 and      /work/SRC/openSUSE:Factory/.shake.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "shake"

Wed Jan 20 18:26:29 2021 rev:5 rq:864468 version:0.19.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/shake/shake.changes      2020-12-22 
11:50:07.714040053 +0100
+++ /work/SRC/openSUSE:Factory/.shake.new.28504/shake.changes   2021-01-20 
18:26:50.383484446 +0100
@@ -1,0 +2,11 @@
+Thu Jan 14 19:37:45 UTC 2021 - [email protected]
+
+- Update shake to version 0.19.4.
+  0.19.4, released 2021-01-14
+      #790, add option shakeAllowRedefineRules
+  *   #790, remove overrideBuiltinRule
+  0.19.3, released 2021-01-14
+      #789, add overrideBuiltinRule
+      #787, more documentation on doesFileExist
+
+-------------------------------------------------------------------

Old:
----
  shake-0.19.2.tar.gz

New:
----
  shake-0.19.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ shake.spec ++++++
--- /var/tmp/diff_new_pack.SxXGF6/_old  2021-01-20 18:26:51.719485718 +0100
+++ /var/tmp/diff_new_pack.SxXGF6/_new  2021-01-20 18:26:51.723485722 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package shake
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name shake
 %bcond_with tests
 Name:           %{pkg_name}
-Version:        0.19.2
+Version:        0.19.4
 Release:        0
 Summary:        Build system library, like Make, but more accurate dependencies
 License:        BSD-3-Clause

++++++ shake-0.19.2.tar.gz -> shake-0.19.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/CHANGES.txt new/shake-0.19.4/CHANGES.txt
--- old/shake-0.19.2/CHANGES.txt        2020-11-15 15:41:17.000000000 +0100
+++ new/shake-0.19.4/CHANGES.txt        2021-01-14 19:29:37.000000000 +0100
@@ -1,5 +1,11 @@
 Changelog for Shake (* = breaking change)
 
+0.19.4, released 2021-01-14
+    #790, add option shakeAllowRedefineRules
+*   #790, remove overrideBuiltinRule
+0.19.3, released 2021-01-14
+    #789, add overrideBuiltinRule
+    #787, more documentation on doesFileExist
 0.19.2, released 2020-11-15
     #780, Autodeps should consider a rename as a write to the destination
     #778, AutoDeps shouldn't trigger for files read and written
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/LICENSE new/shake-0.19.4/LICENSE
--- old/shake-0.19.2/LICENSE    2020-01-08 10:44:31.000000000 +0100
+++ new/shake-0.19.4/LICENSE    2021-01-03 13:30:56.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright Neil Mitchell 2011-2020.
+Copyright Neil Mitchell 2011-2021.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/README.md new/shake-0.19.4/README.md
--- old/shake-0.19.2/README.md  2019-03-22 11:58:38.000000000 +0100
+++ new/shake-0.19.4/README.md  2020-11-24 11:00:04.000000000 +0100
@@ -1,4 +1,4 @@
-# Shake [![Hackage 
version](https://img.shields.io/hackage/v/shake.svg?label=Hackage)](https://hackage.haskell.org/package/shake)
 [![Stackage 
version](https://www.stackage.org/package/shake/badge/nightly?label=Stackage)](https://www.stackage.org/package/shake)
 [![Linux build 
status](https://img.shields.io/travis/ndmitchell/shake/master.svg?label=Linux%20build)](https://travis-ci.org/ndmitchell/shake)
 [![Windows build 
status](https://img.shields.io/appveyor/ci/ndmitchell/shake/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/ndmitchell/shake)
+# Shake [![Hackage 
version](https://img.shields.io/hackage/v/shake.svg?label=Hackage)](https://hackage.haskell.org/package/shake)
 [![Stackage 
version](https://www.stackage.org/package/shake/badge/nightly?label=Stackage)](https://www.stackage.org/package/shake)
 [![Build 
status](https://img.shields.io/github/workflow/status/ndmitchell/shake/ci.svg)](https://github.com/ndmitchell/shake/actions)
 
 Shake is a tool for writing build systems - an alternative to make, Scons, Ant 
etc. Shake has been used commercially for over five years, running thousands of 
builds per day. The website for Shake users is at 
[shakebuild.com](https://shakebuild.com).
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/shake.cabal new/shake-0.19.4/shake.cabal
--- old/shake-0.19.2/shake.cabal        2020-11-15 15:41:26.000000000 +0100
+++ new/shake-0.19.4/shake.cabal        2021-01-14 19:29:44.000000000 +0100
@@ -1,13 +1,13 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               shake
-version:            0.19.2
+version:            0.19.4
 license:            BSD3
 license-file:       LICENSE
 category:           Development, Shake
 author:             Neil Mitchell <[email protected]>
 maintainer:         Neil Mitchell <[email protected]>
-copyright:          Neil Mitchell 2011-2020
+copyright:          Neil Mitchell 2011-2021
 synopsis:           Build system library, like Make, but more accurate 
dependencies.
 description:
     Shake is a Haskell library for writing build systems - designed as a
@@ -457,6 +457,7 @@
         Test.Batch
         Test.Benchmark
         Test.Builtin
+        Test.BuiltinOverride
         Test.C
         Test.Cache
         Test.Cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Development/Shake/Internal/Args.hs 
new/shake-0.19.4/src/Development/Shake/Internal/Args.hs
--- old/shake-0.19.2/src/Development/Shake/Internal/Args.hs     2020-09-17 
14:19:56.000000000 +0200
+++ new/shake-0.19.4/src/Development/Shake/Internal/Args.hs     2021-01-14 
19:26:30.000000000 +0100
@@ -310,6 +310,8 @@
 shakeOptsEx :: [(Bool, OptDescr (Either String ([Extra], ShakeOptions -> 
ShakeOptions)))]
 shakeOptsEx =
     [opts $ Option "a" ["abbrev"] (reqArgPair "abbrev" "FULL=SHORT" $ \a s -> 
s{shakeAbbreviations=shakeAbbreviations s ++ [a]}) "Use abbreviation in status 
messages."
+    ,opts $ Option ""  ["allow-redefine-rules"] (noArg $ \s -> 
s{shakeAllowRedefineRules = True}) "Allow redefining built-in rules"
+    ,opts $ Option ""  ["no-allow-redefine-rules"] (noArg $ \s -> 
s{shakeAllowRedefineRules = False}) "Forbid redefining built-in rules (default)"
     ,extr $ Option ""  ["no-build"] (noArg [NoBuild]) "Don't build anything."
     ,extr $ Option "C" ["directory"] (reqArg "DIRECTORY" $ \x -> 
[ChangeDirectory x]) "Change to DIRECTORY before doing anything."
 --    ,yes $ Option ""  ["cloud"] (reqArg "URL" $ \x s -> 
s{shakeCloud=shakeCloud s ++ [x]}) "HTTP server providing a cloud cache."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shake-0.19.2/src/Development/Shake/Internal/Core/Rules.hs 
new/shake-0.19.4/src/Development/Shake/Internal/Core/Rules.hs
--- old/shake-0.19.2/src/Development/Shake/Internal/Core/Rules.hs       
2020-06-03 00:07:29.000000000 +0200
+++ new/shake-0.19.4/src/Development/Shake/Internal/Core/Rules.hs       
2021-01-14 19:26:30.000000000 +0100
@@ -129,10 +129,10 @@
 
 runRules :: ShakeOptions -> Rules () -> IO (SRules [])
 runRules opts (Rules r) = do
-    ref <- newIORef mempty
+    ref <- newIORef mempty{allowOverwrite = shakeAllowRedefineRules opts}
     runReaderT r (opts, ref)
     SRules{..} <- readIORef ref
-    pure $ SRules (runListBuilder actions) builtinRules userRules 
(runListBuilder targets) (runListBuilder helpSuffix)
+    pure $ SRules (runListBuilder actions) builtinRules userRules 
(runListBuilder targets) (runListBuilder helpSuffix) allowOverwrite
 
 -- | Get all targets registered in the given rules. The names in
 --   'Development.Shake.phony' and 'Development.Shake.~>' as well as the file 
patterns
@@ -160,14 +160,20 @@
     ,userRules :: !(TMap.Map UserRuleVersioned)
     ,targets :: !(list Target)
     ,helpSuffix :: !(list String)
+    ,allowOverwrite :: Bool
     }
 
 instance Semigroup (SRules ListBuilder) where
-    (SRules x1 x2 x3 x4 x5) <> (SRules y1 y2 y3 y4 y5) = SRules (mappend x1 
y1) (Map.unionWithKey f x2 y2) (TMap.unionWith (<>) x3 y3) (mappend x4 y4) 
(mappend x5 y5)
-        where f k a b = throwImpure $ errorRuleDefinedMultipleTimes k 
[builtinLocation a, builtinLocation b]
+    (SRules x1 x2 x3 x4 x5 x6) <> (SRules y1 y2 y3 y4 y5 y6) =
+      SRules (mappend x1 y1) (Map.unionWithKey f x2 y2) (TMap.unionWith (<>) 
x3 y3) (mappend x4 y4) (mappend x5 y5) canOverwrite
+      where
+        canOverwrite = x6 && y6
+        f k a b
+          | canOverwrite = b
+          | otherwise = throwImpure $ errorRuleDefinedMultipleTimes k 
[builtinLocation a, builtinLocation b]
 
 instance Monoid (SRules ListBuilder) where
-    mempty = SRules mempty Map.empty TMap.empty mempty mempty
+    mempty = SRules mempty Map.empty TMap.empty mempty mempty True
     mappend = (<>)
 
 instance Semigroup a => Semigroup (Rules a) where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shake-0.19.2/src/Development/Shake/Internal/Derived.hs 
new/shake-0.19.4/src/Development/Shake/Internal/Derived.hs
--- old/shake-0.19.2/src/Development/Shake/Internal/Derived.hs  2020-03-08 
14:28:52.000000000 +0100
+++ new/shake-0.19.4/src/Development/Shake/Internal/Derived.hs  2020-11-23 
13:24:12.000000000 +0100
@@ -17,7 +17,7 @@
 import Control.Monad.IO.Class
 import System.Directory
 import System.FilePath (takeDirectory)
-import System.IO
+import System.IO (IOMode (..), hGetContents, withFile)
 import qualified System.IO.Extra as IO
 
 import Development.Shake.Internal.Errors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shake-0.19.2/src/Development/Shake/Internal/Options.hs 
new/shake-0.19.4/src/Development/Shake/Internal/Options.hs
--- old/shake-0.19.2/src/Development/Shake/Internal/Options.hs  2020-06-01 
23:57:12.000000000 +0200
+++ new/shake-0.19.4/src/Development/Shake/Internal/Options.hs  2021-01-14 
19:26:30.000000000 +0100
@@ -214,6 +214,8 @@
     ,shakeNeedDirectory :: Bool
         -- ^ Defaults to @False@. Is depending on a directory an error 
(default), or it is permitted with
         --   undefined results. Provided for compatibility with @ninja@.
+    ,shakeAllowRedefineRules :: Bool
+        -- ^ Whether to allow calling addBuiltinRule for the same key more 
than once
     ,shakeProgress :: IO Progress -> IO ()
         -- ^ Defaults to no action. A function called when the build starts, 
allowing progress to be reported.
         --   The function is called on a separate thread, and that thread is 
killed when the build completes.
@@ -238,7 +240,7 @@
 shakeOptions :: ShakeOptions
 shakeOptions = ShakeOptions
     ".shake" 1 "1" Info False [] Nothing [] [] [] [] (Just 10) [] [] False 
True False
-    True ChangeModtime True [] False False Nothing [] False False
+    True ChangeModtime True [] False False Nothing [] False False False
     (const $ pure ())
     (const $ BS.putStrLn . UTF8.fromString) -- try and output atomically using 
BS
     (\_ _ _ -> pure ())
@@ -250,20 +252,20 @@
     ,"shakeFlush", "shakeRebuild", "shakeAbbreviations", "shakeStorageLog"
     ,"shakeLineBuffering", "shakeTimings", "shakeRunCommands", "shakeChange", 
"shakeCreationCheck"
     ,"shakeLiveFiles", "shakeVersionIgnore", "shakeColor", "shakeShare", 
"shakeCloud", "shakeSymlink"
-    ,"shakeNeedDirectory"
+    ,"shakeNeedDirectory", "shakeCanRedefineRules"
     ,"shakeProgress", "shakeOutput", "shakeTrace", "shakeExtra"]
 tyShakeOptions = mkDataType "Development.Shake.Types.ShakeOptions" 
[conShakeOptions]
 conShakeOptions = mkConstr tyShakeOptions "ShakeOptions" fieldsShakeOptions 
Prefix
-unhide x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 
x21 x22 x23 x24 x25 x26 x27 y1 y2 y3 y4 =
-    ShakeOptions x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 
x18 x19 x20 x21 x22 x23 x24 x25 x26 x27
+unhide x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 
x21 x22 x23 x24 x25 x26 x27 x28 y1 y2 y3 y4 =
+  ShakeOptions x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 
x19 x20 x21 x22 x23 x24 x25 x26 x27 x28
         (fromHidden y1) (fromHidden y2) (fromHidden y3) (fromHidden y4)
 
 instance Data ShakeOptions where
-    gfoldl k z (ShakeOptions x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 
x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 y1 y2 y3 y4) =
+    gfoldl k z (ShakeOptions x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 
x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 y1 y2 y3 y4) =
         z unhide `k` x1 `k` x2 `k` x3 `k` x4 `k` x5 `k` x6 `k` x7 `k` x8 `k` 
x9 `k` x10 `k` x11 `k`
-        x12 `k` x13 `k` x14 `k` x15 `k` x16 `k` x17 `k` x18 `k` x19 `k` x20 
`k` x21 `k` x22 `k` x23 `k` x24 `k` x25 `k` x26 `k` x27 `k`
+        x12 `k` x13 `k` x14 `k` x15 `k` x16 `k` x17 `k` x18 `k` x19 `k` x20 
`k` x21 `k` x22 `k` x23 `k` x24 `k` x25 `k` x26 `k` x27 `k` x28 `k`
         Hidden y1 `k` Hidden y2 `k` Hidden y3 `k` Hidden y4
-    gunfold k z _ = k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k 
$ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ z unhide
+    gunfold k z _ = k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k 
$ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ k $ z unhide
     toConstr ShakeOptions{} = conShakeOptions
     dataTypeOf _ = tyShakeOptions
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/shake-0.19.2/src/Development/Shake/Internal/Rules/Directory.hs 
new/shake-0.19.4/src/Development/Shake/Internal/Rules/Directory.hs
--- old/shake-0.19.2/src/Development/Shake/Internal/Rules/Directory.hs  
2020-03-08 14:34:21.000000000 +0100
+++ new/shake-0.19.4/src/Development/Shake/Internal/Rules/Directory.hs  
2020-12-13 12:00:00.000000000 +0100
@@ -148,15 +148,38 @@
 
 -- | Returns 'True' if the file exists. The existence of the file is tracked 
as a
 --   dependency, and if the file is created or deleted the rule will rerun in 
subsequent builds.
+--   Usually used to implement include paths. For example, given a include 
path of @foo@ and @bar@,
+--   and a file @hello.txt@, you might write:
+--
+-- @
+-- b <- 'doesFileExist' \"foo\/hello.txt\"
+-- let file = if b then \"foo\/hello.txt\" else "\bar\/hello.txt\"
+-- @
+--
+--   Now if the user had a file @bar\/hello.txt@, and then creates a file 
@foo\/hello.txt@, the
+--   rule would correctly rerun, as while the @hello.txt@ that was used didn't 
change, which
+--   file should be used has changed.
 --
 --   You should not call 'doesFileExist' on files which can be created by the 
build system.
+--   The reason is that Shake operations such as this one are both cached for 
the duration of the build,
+--   and may be run preemptively during a recheck. That means you can't 
control the time at which
+--   'doesFileExist' is called. For that to be consistent, 'doesFileExist' 
must return the same result at the
+--   start and end of the build, a property that is partially checked by the 
@--lint@ flag. Given a
+--   file created by the build system, a build from clean will return 'False' 
at the beginning and 'True'
+--   at the end, leading to a change, and thus rebuilds in subsequent runs.
+--
+--   If you do want to know whether a file exists separate to the build 
system, e.g. you can perfectly
+--   predict the files contents and can save some meaningful work if the file 
already exists, you should
+--   use the untracked "System.Directory" version. Such calls are not tracked 
by the file system, and you
+--   should take care not to result in unpredictable results.
 doesFileExist :: FilePath -> Action Bool
 doesFileExist = fmap fromDoesFileExistA . apply1 . DoesFileExistQ . toStandard
 
 -- | Returns 'True' if the directory exists. The existence of the directory is 
tracked as a
 --   dependency, and if the directory is created or delete the rule will rerun 
in subsequent builds.
 --
---   You should not call 'doesDirectoryExist' on directories which can be 
created by the build system.
+--   You should not call 'doesDirectoryExist' on directories which can be 
created by the build system,
+--   for reasons explained in 'doesFileExist'.
 doesDirectoryExist :: FilePath -> Action Bool
 doesDirectoryExist = fmap fromDoesDirectoryExistA . apply1 . 
DoesDirectoryExistQ . toStandard
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Run.hs new/shake-0.19.4/src/Run.hs
--- old/shake-0.19.2/src/Run.hs 2020-05-17 21:29:50.000000000 +0200
+++ new/shake-0.19.4/src/Run.hs 2020-11-24 09:47:38.000000000 +0100
@@ -14,6 +14,7 @@
 import General.GetOpt
 import System.Process
 import System.Exit
+import Data.Either.Extra
 
 
 main :: IO ()
@@ -51,4 +52,4 @@
         ]
 
 findFile :: [FilePath] -> IO (Maybe FilePath)
-findFile = findM (fmap (either (const False) id) . tryIO . IO.doesFileExist)
+findFile = findM (fmap (fromRight False) . tryIO . IO.doesFileExist)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/BuiltinOverride.hs 
new/shake-0.19.4/src/Test/BuiltinOverride.hs
--- old/shake-0.19.2/src/Test/BuiltinOverride.hs        1970-01-01 
01:00:00.000000000 +0100
+++ new/shake-0.19.4/src/Test/BuiltinOverride.hs        2021-01-14 
19:26:30.000000000 +0100
@@ -0,0 +1,38 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module Test.BuiltinOverride (main) where
+
+import Control.Concurrent
+import Development.Shake
+import Development.Shake.Classes
+import Development.Shake.Rule
+import Test.Type
+
+newtype Key = Key Int
+  deriving (Show, Eq, Hashable, Binary, NFData, Typeable)
+
+type instance RuleResult Key = ()
+
+main sleep = do
+  store <- newEmptyMVar
+
+  testBuild (test store) (setRules store) sleep
+
+setRules resultsStore = do
+  addBuiltinRule noLint noIdentity $ \(Key n) _ _ -> do
+    liftIO $ putMVar resultsStore n
+    pure $ RunResult ChangedRecomputeDiff mempty ()
+  addBuiltinRule noLint noIdentity $ \(Key n) _ _ -> do
+    liftIO $ putMVar resultsStore (n + 1)
+    pure $ RunResult ChangedRecomputeDiff mempty ()
+  action $ apply1 $ Key 1
+
+test store build = do
+  build ["--allow-redefine-rules"]
+
+  res <- takeMVar store
+  assertBool (res == 2) "Rule was not overriden"
+
+  assertException ["rule defined twice"] $ build ["--quiet"]
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Command.hs 
new/shake-0.19.4/src/Test/Command.hs
--- old/shake-0.19.2/src/Test/Command.hs        2020-05-19 09:13:38.000000000 
+0200
+++ new/shake-0.19.4/src/Test/Command.hs        2020-11-23 13:36:05.000000000 
+0100
@@ -27,9 +27,9 @@
                           name ~> do need ["helper/shake_helper" <.> exe]; test
 
     let helper_source = unlines
-            ["import System.Time.Extra"
-            ,"import System.Process"
+            ["import System.Process"
             ,"import Control.Monad"
+            ,"import Control.Concurrent"
             ,"import System.Directory"
             ,"import System.Environment"
             ,"import System.Exit"
@@ -45,7 +45,7 @@
             ,"            'x' -> exitFailure"
             ,"            'c' -> putStrLn =<< getCurrentDirectory"
             ,"            'v' -> putStrLn =<< getEnv rg"
-            ,"            'w' -> sleep (read rg :: Double)"
+            ,"            'w' -> threadDelay $ ceiling $ (read rg :: Double) * 
1000000"
             ,"            'r' -> LBS.putStr $ LBS.replicate (read rg) 'x'"
             ,"            'i' -> putStr =<< getContents"
             ,"            's' -> void $ readProcess exe [rg] \"\""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Docs.hs 
new/shake-0.19.4/src/Test/Docs.hs
--- old/shake-0.19.2/src/Test/Docs.hs   2020-05-17 22:48:14.000000000 +0200
+++ new/shake-0.19.4/src/Test/Docs.hs   2020-11-23 20:01:09.000000000 +0100
@@ -18,7 +18,7 @@
 -- GHC 8.0 has a segfault when linking Setup
 brokenHaddock = compilerVersion < makeVersion [8,2]
 
-main = testBuild (unless brokenHaddock . defaultTest) $ do
+main = testBuild (notCI . unless brokenHaddock . defaultTest) $ do
     let index = "dist/doc/html/shake/index.html"
     let setup = "dist/setup.exe"
     let config = "dist/setup-config"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Errors.hs 
new/shake-0.19.4/src/Test/Errors.hs
--- old/shake-0.19.2/src/Test/Errors.hs 2020-03-15 13:24:20.000000000 +0100
+++ new/shake-0.19.4/src/Test/Errors.hs 2020-11-23 20:25:01.000000000 +0100
@@ -195,7 +195,7 @@
     crash ["failcreates"] ["failcreates"]
     crash ["recursive_"] ["recursive_","intermediate_","recursive"]
     crash ["rec1","rec2"] ["rec1","rec2","indirect recursion","recursive"]
-    crash ["systemcmd"] $ ["systemcmd","random_missing_command"] ++ ["at cmd, 
called at" | hasLocations]
+    notCI $ crash ["systemcmd"] $ ["systemcmd","random_missing_command"] ++ 
["at cmd, called at" | hasLocations]
     crash ["stack1"] ["stack1","stack2","stack3","crash"]
 
     b <- IO.doesFileExist "staunch1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Self.hs 
new/shake-0.19.4/src/Test/Self.hs
--- old/shake-0.19.2/src/Test/Self.hs   2020-03-15 13:24:39.000000000 +0100
+++ new/shake-0.19.4/src/Test/Self.hs   2020-11-24 08:54:57.000000000 +0100
@@ -35,6 +35,7 @@
         map ("-package=" ++) <$> readFileLines ".pkgs"
 
     let ghc args = do
+            trackAllow ["**/package.cache", "**/.ghc.environment.*"]
             -- since ghc-pkg includes the ghc package, it changes if the 
version does
             ghcPkg $ GhcPkg ()
             flags <- ghcFlags $ GhcFlags ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/SelfMake.hs 
new/shake-0.19.4/src/Test/SelfMake.hs
--- old/shake-0.19.2/src/Test/SelfMake.hs       2020-05-17 13:31:02.000000000 
+0200
+++ new/shake-0.19.4/src/Test/SelfMake.hs       2020-11-24 09:35:40.000000000 
+0100
@@ -31,6 +31,7 @@
         map ("-package=" ++) <$> readFileLines ".pkgs"
 
     let ghc args = do
+            trackAllow ["**/package.cache", "**/.ghc.environment.*"]
             -- since ghc-pkg includes the ghc package, it changes if the 
version does
             ghcPkg $ GhcPkg ()
             flags <- ghcFlags $ GhcFlags ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Tup.hs 
new/shake-0.19.4/src/Test/Tup.hs
--- old/shake-0.19.2/src/Test/Tup.hs    2020-03-15 13:24:43.000000000 +0100
+++ new/shake-0.19.4/src/Test/Tup.hs    2020-11-24 09:57:55.000000000 +0100
@@ -7,9 +7,12 @@
 import Development.Shake.Util
 import Test.Type
 import Data.Maybe
+import Control.Monad
+import System.Info.Extra
 
 
-main = testBuild defaultTest $ do
+-- Running ar on Mac seems to break in CI - not sure why
+main = testBuild (unless isMac . defaultTest) $ do
     -- Example inspired by http://gittup.org/tup/ex_multiple_directories.html
     usingConfigFile $ shakeRoot </> "src/Test/Tup/root.cfg"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test/Type.hs 
new/shake-0.19.4/src/Test/Type.hs
--- old/shake-0.19.2/src/Test/Type.hs   2020-05-17 21:26:04.000000000 +0200
+++ new/shake-0.19.4/src/Test/Type.hs   2020-11-24 00:22:32.000000000 +0100
@@ -4,7 +4,7 @@
     sleep, sleepFileTime, sleepFileTimeCalibrate,
     testBuildArgs, testBuild, testSimple, testNone,
     shakeRoot,
-    defaultTest, hasTracker,
+    defaultTest, hasTracker, notCI,
     copyDirectoryChanged, copyFileChangedIO,
     assertWithin,
     assertBool, assertBoolIO, assertException, assertExceptionAfter,
@@ -39,6 +39,7 @@
 import General.GetOpt
 import System.IO.Extra as IO
 import System.Time.Extra
+import System.Info.Extra
 
 
 testBuildArgs
@@ -153,10 +154,17 @@
     fsatrace <- findExecutable $ "fsatrace" <.> exe
     pure $ if isJust fsatrace then LintFSATrace else LintBasic
 
+-- Tests that don't currently work on CI
+notCI :: IO () -> IO ()
+notCI act = do
+    b <- lookupEnv "CI"
+    when (isNothing b) act
+
 hasTracker :: IO Bool
 hasTracker = do
     t <- tracker
-    pure $ t == LintFSATrace
+    -- Tracking on a Mac is pretty unreliable
+    pure $ not isMac && t == LintFSATrace
 
 assertFail :: String -> IO a
 assertFail msg = error $ "ASSERTION FAILED: " ++ msg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shake-0.19.2/src/Test.hs new/shake-0.19.4/src/Test.hs
--- old/shake-0.19.2/src/Test.hs        2020-05-25 09:29:59.000000000 +0200
+++ new/shake-0.19.4/src/Test.hs        2021-01-14 10:02:29.000000000 +0100
@@ -18,6 +18,7 @@
 import qualified Test.Batch
 import qualified Test.Benchmark
 import qualified Test.Builtin
+import qualified Test.BuiltinOverride
 import qualified Test.C
 import qualified Test.Cache
 import qualified Test.Cleanup
@@ -74,6 +75,7 @@
     ,"batch" * Test.Batch.main
     ,"benchmark" * Test.Benchmark.main
     ,"builtin" * Test.Builtin.main
+    ,"builtinOverride" * Test.BuiltinOverride.main
     ,"c" * Test.C.main
     ,"cache" * Test.Cache.main
     ,"cleanup" * Test.Cleanup.main

Reply via email to