@@ -696,17 +696,6 @@ shakeRestart recorder IdeState{..} vfs reason acts =
696
696
queue <- atomicallyNamed " actionQueue - peek" $ peekInProgress $ actionQueue shakeExtras
697
697
698
698
log Debug $ LogBuildSessionRestart reason queue backlog stopTime res
699
-
700
- let profile = case res of
701
- Just fp -> " , profile saved at " <> fp
702
- _ -> " "
703
- -- TODO: should replace with logging using a logger that sends lsp message
704
- let msg = T. pack $ " Restarting build session " ++ reason' ++ queueMsg ++ keysMsg ++ abortMsg
705
- reason' = " due to " ++ reason
706
- queueMsg = " with queue " ++ show (map actionName queue)
707
- keysMsg = " for keys " ++ show (HSet. toList backlog) ++ " "
708
- abortMsg = " (aborting the previous one took " ++ showDuration stopTime ++ profile ++ " )"
709
- notifyTestingLogMessage shakeExtras msg
710
699
)
711
700
-- It is crucial to be masked here, otherwise we can get killed
712
701
-- between spawning the new thread and updating shakeSession.
@@ -719,13 +708,6 @@ shakeRestart recorder IdeState{..} vfs reason acts =
719
708
sleep seconds
720
709
logWith recorder Error (LogBuildSessionRestartTakingTooLong seconds)
721
710
722
- notifyTestingLogMessage :: ShakeExtras -> T. Text -> IO ()
723
- notifyTestingLogMessage extras msg = do
724
- (IdeTesting isTestMode) <- optTesting <$> getIdeOptionsIO extras
725
- let notif = LSP. LogMessageParams LSP. MtLog msg
726
- when isTestMode $ mRunLspT (lspEnv extras) $ LSP. sendNotification LSP. SWindowLogMessage notif
727
-
728
-
729
711
-- | Enqueue an action in the existing 'ShakeSession'.
730
712
-- Returns a computation to block until the action is run, propagating exceptions.
731
713
-- Assumes a 'ShakeSession' is available.
@@ -797,17 +779,12 @@ newSession recorder extras@ShakeExtras{..} vfsMod shakeDb acts reason = do
797
779
let keysActs = pumpActionThread otSpan : map (run otSpan) (reenqueued ++ acts)
798
780
res <- try @ SomeException $
799
781
restore $ shakeRunDatabaseForKeys (HSet. toList <$> allPendingKeys) shakeDb keysActs
800
- let res' = case res of
801
- Left e -> " exception: " <> displayException e
802
- Right _ -> " completed"
803
- let msg = T. pack $ " Finishing build session(" ++ res' ++ " )"
804
782
return $ do
805
783
let exception =
806
784
case res of
807
785
Left e -> Just e
808
786
_ -> Nothing
809
787
logWith recorder Debug $ LogBuildSessionFinish exception
810
- notifyTestingLogMessage extras msg
811
788
812
789
-- Do the work in a background thread
813
790
workThread <- asyncWithUnmask workRun
0 commit comments