packages feed

shake 0.11.5 → 0.11.6

raw patch · 6 files changed

+20/−10 lines, 6 files

Files

CHANGES.txt view
@@ -1,5 +1,9 @@ Changelog for Shake +0.11.6+    #114, run build.sh in the test suite with sh+    #115, fix the test suite on Linux GHC 7.8+    #116, fix for GHC 7.10 0.11.5     Include the sources for flot and jQuery in the dist tarball     Note that .. in FilePattern values is unlikely to be correct
Development/Ninja/All.hs view
@@ -101,7 +101,8 @@                     when (deps /= "gcc") $ need [depfile]
                     depsrc <- liftIO $ BS.readFile depfile
                     needDeps build $ concatMap snd $ parseMakefile depsrc
-                    when (deps == "gcc") $ liftIO $ removeFile depfile
+                    -- correct as per the Ninja spec, but breaks --skip-commands
+                    -- when (deps == "gcc") $ liftIO $ removeFile depfile
 
 
 needDeps :: Ninja -> Build -> [Str] -> Action ()
Development/Shake/Rules/Directory.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, ScopedTypeVariables, DeriveDataTypeable, RecordWildCards #-}+{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, ScopedTypeVariables, DeriveDataTypeable, RecordWildCards, FlexibleContexts #-}  -- | Both System.Directory and System.Environment wrappers module Development.Shake.Rules.Directory(
Examples/Test/Manual.hs view
@@ -16,7 +16,7 @@     copyDirectory "Development" $ obj "manual/Development"     copyDirectory "General" $ obj "manual/General"     copyFile "Paths.hs" $ obj "manual/Paths_shake.hs"-    let cmdline = if isWindows then "build.bat" else "./build.sh"+    let cmdline = if isWindows then "build.bat" else "/bin/sh build.sh"     () <- cmd [Cwd $ obj "manual", Shell] cmdline "-j2"     assertExists $ obj "manual/_build/run" <.> exe     () <- cmd [Cwd $ obj "manual", Shell] cmdline
Examples/Util.hs view
@@ -4,6 +4,8 @@ import Development.Shake import Development.Shake.Rule() -- ensure the module gets imported, and thus tested import General.Base+import General.String+import Development.Shake.FileTime import Development.Shake.FilePath  import Control.Exception hiding (assert)@@ -141,15 +143,18 @@ sleepFileTimeCalibrate = do     let file = "output/calibrate"     createDirectoryIfMissing True $ takeDirectory file-    mtime <- fmap maximum $ forM [1..3] $ \i -> fmap fst $ duration $ do+    mtimes <- forM [1..3] $ \i -> fmap fst $ duration $ do         writeFile file $ show i-        t1 <- getModificationTime file+        -- important to benchmark both modtimes, since #117 means unicode files+        -- fall back to getModificationTime on Windows+        let time = liftM2 (,) (getModificationTime file) (getModTimeError "File is missing" $ packU file)+        t1 <- time         flip loop 0 $ \j -> do             writeFile file $ show (i,j)-            t2 <- getModificationTime file-            return $ if t1 == t2 then Left $ j+1 else Right ()-    putStrLn $ "Longest file modification time lag was " ++ show mtime ++ "s"-    return $ sleep $ min 1 $ mtime * 2+            t2 <- time+            return $ if fst t1 == fst t2 || snd t1 == snd t2 then Left $ j+1 else Right ()+    putStrLn $ "Longest file modification time lag was " ++ show (ceiling (maximum mtimes * 1000)) ++ "ms"+    return $ sleep $ min 1 $ maximum mtimes * 2   removeFilesRandom :: FilePath -> IO Int
shake.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.10 build-type:         Simple name:               shake-version:            0.11.5+version:            0.11.6 license:            BSD3 license-file:       LICENSE category:           Development