@@ -33,6 +33,7 @@ import Development.IDE.Core.RuleTypes (GhcSession (GhcSession),
3333 GhcSessionDeps (GhcSessionDeps ),
3434 GhcSessionIO (GhcSessionIO ))
3535import Development.IDE.Graph (Action , actionBracket )
36+ import Development.IDE.Graph.Rule
3637import Development.IDE.Types.Location (Uri (.. ))
3738import Development.IDE.Types.Logger (Logger , logDebug , logInfo )
3839import Development.IDE.Types.Shake (Key (.. ), Value ,
@@ -77,21 +78,25 @@ otTracedAction
7778 :: Show k
7879 => k -- ^ The Action's Key
7980 -> NormalizedFilePath -- ^ Path to the file the action was run for
80- -> (a -> Bool ) -- ^ Did this action succeed?
81- -> Action a -- ^ The action
82- -> Action a
83- otTracedAction key file success act
81+ -> RunMode
82+ -> (a -> Bool )
83+ -> Action (RunResult a ) -- ^ The action
84+ -> Action (RunResult a )
85+ otTracedAction key file mode success act
8486 | userTracingEnabled =
8587 actionBracket
8688 (do
8789 sp <- beginSpan (fromString (show key))
8890 setTag sp " File" (fromString $ fromNormalizedFilePath file)
91+ setTag sp " Mode" (fromString $ show mode)
8992 return sp
9093 )
9194 endSpan
9295 (\ sp -> do
9396 res <- act
94- unless (success res) $ setTag sp " error" " 1"
97+ unless (success $ runValue res) $ setTag sp " error" " 1"
98+ setTag sp " changed" $ case res of
99+ RunResult x _ _ -> fromString $ show x
95100 return res)
96101 | otherwise = act
97102
0 commit comments