From c6ec7732fab11d6b34ab5aaed194db44ce21b61f Mon Sep 17 00:00:00 2001 From: Ted Kornish Date: Mon, 21 Sep 2015 02:07:42 -0700 Subject: [PATCH 1/2] Set default FileWatch command to force a rebuild --- src/Stack/FileWatch.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stack/FileWatch.hs b/src/Stack/FileWatch.hs index b8957c6b70..f26ed2034d 100644 --- a/src/Stack/FileWatch.hs +++ b/src/Stack/FileWatch.hs @@ -110,6 +110,7 @@ fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do "watched" -> do watch <- readTVarIO watchVar mapM_ (putStrLn . toFilePath) (Map.keys watch) + "" -> atomically $ writeTVar dirtyVar True _ -> putStrLn $ concat [ "Unknown command: " , show line @@ -137,4 +138,4 @@ fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do Left e -> printExceptionStderr e Right () -> putStrLn "Success! Waiting for next file change." - putStrLn "Type help for available commands" + putStrLn "Type help for available commands. Press enter to force a rebuild." From fc2d25b18aeb50f910b732eb3f527fd14318bdf7 Mon Sep 17 00:00:00 2001 From: Ted Kornish Date: Mon, 21 Sep 2015 02:33:14 -0700 Subject: [PATCH 2/2] Include 'press enter to force a rebuild' in waiting message --- src/Stack/FileWatch.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stack/FileWatch.hs b/src/Stack/FileWatch.hs index f26ed2034d..896eb371fb 100644 --- a/src/Stack/FileWatch.hs +++ b/src/Stack/FileWatch.hs @@ -136,6 +136,7 @@ fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do case eres of Left e -> printExceptionStderr e - Right () -> putStrLn "Success! Waiting for next file change." + Right () -> putStrLn "Success! Waiting for next file change. " ++ + "Press enter to force a rebuild." putStrLn "Type help for available commands. Press enter to force a rebuild."