Skip to content

Commit

Permalink
Output lint errors on stderr, small comment about more lint opportuni…
Browse files Browse the repository at this point in the history
…ties
  • Loading branch information
batterseapower committed Feb 8, 2011
1 parent b374c82 commit c2adbb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Development/Shake/Core.hs
Expand Up @@ -72,6 +72,7 @@ import Data.Time.Clock (UTCTime, NominalDiffTime, getCurrentTime, diffUTCTime)
import Data.Foldable (traverse_)

import System.Environment
import System.IO
import System.IO.Unsafe (unsafePerformIO) -- For command line parsing hack only

import GHC.Conc (numCapabilities)
Expand Down Expand Up @@ -858,5 +859,5 @@ runActLinted creates_fps e action = do
-- User code transitioned from ss to ss' before returning without needing anything else
mb_sss <- retakeSnapshot []
-- FIXME: accumulate errors rather than showing them eagerly like this
liftIO $ mapM_ putStrLn $ lintSnapshots creates_fps (reverse $ maybe id (:) mb_sss (as_snapshots final_nested_s))
liftIO $ mapM_ (hPutStrLn stderr) $ lintSnapshots creates_fps (reverse $ maybe id (:) mb_sss (as_snapshots final_nested_s))
return (as_this_history final_nested_s, res)
1 change: 1 addition & 0 deletions Development/Shake/Files.hs
Expand Up @@ -136,6 +136,7 @@ instance Namespace CanonicalFilePath where
then return (seen', S.insert fp seen_files)
else getDirectoryContents (canonicalFilePath fp) >>= (foldM (explore fp) (seen', seen_files) . map (originalFilePath fp </>))

-- TODO: I could lint modification times as well? For example, you should probably not modify a file you need
lintSnapshots building_fps = go S.empty S.empty S.empty
where
go needed accessed accessed_without_need history = case history of
Expand Down

0 comments on commit c2adbb8

Please sign in to comment.