@@ -198,6 +198,9 @@ data Log
198
198
-- * OfInterest Log messages
199
199
| LogSetFilesOfInterest ! [(NormalizedFilePath , FileOfInterestStatus )]
200
200
| LogTimeOutShuttingDownWaitForSessionVar ! Seconds
201
+ | LogShakeShutProcess ! ShutStage
202
+ deriving Show
203
+ data ShutStage = ShutSessionCanceled | ShutProfiledDone | ShutProgressMonitorStop | ShutProgressStop | ShutSessionGet
201
204
deriving Show
202
205
203
206
instance Pretty Log where
@@ -242,7 +245,7 @@ instance Pretty Log where
242
245
" Set files of interst to" <> Pretty. line
243
246
<> indent 4 (pretty $ fmap (first fromNormalizedFilePath) ofInterest)
244
247
LogTimeOutShuttingDownWaitForSessionVar seconds ->
245
- " Timed out waiting for session var after" <+> pretty seconds <+> " seconds"
248
+ " ShutWaitFor session timed out waiting for session var after" <+> pretty seconds <+> " seconds"
246
249
247
250
-- | We need to serialize writes to the database, so we send any function that
248
251
-- needs to write to the database over the channel, where it will be picked up by
@@ -732,15 +735,19 @@ shakeShut recorder IdeState{..} = do
732
735
res <- timeout 1 $ withMVar shakeSession $ \ runner -> do
733
736
-- Shake gets unhappy if you try to close when there is a running
734
737
-- request so we first abort that.
738
+ logWith recorder Warning $ LogShakeShutProcess ShutSessionGet
735
739
cancelShakeSession runner
740
+ logWith recorder Warning $ LogShakeShutProcess ShutSessionCanceled
736
741
void $ shakeDatabaseProfile shakeDb
742
+ logWith recorder Warning $ LogShakeShutProcess ShutProfiledDone
737
743
-- might hang if there are still running
738
744
progressStop $ progress shakeExtras
745
+ logWith recorder Warning $ LogShakeShutProcess ShutProgressStop
739
746
stopMonitoring
747
+ logWith recorder Warning $ LogShakeShutProcess ShutProgressMonitorStop
740
748
case res of
741
- Nothing -> do
749
+ Nothing ->
742
750
logWith recorder Error $ LogTimeOutShuttingDownWaitForSessionVar 1
743
- stopMonitoring
744
751
Just _ -> pure ()
745
752
746
753
-- | This is a variant of withMVar where the first argument is run unmasked and if it throws
0 commit comments