Skip to content

Commit eb32021

Browse files
committed
guard with argsTesting
1 parent b39b112 commit eb32021

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exe/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ main = do
6464
liftIO $ (cb1 <> cb2) env
6565
}
6666

67-
let (minPriority, logFilePath, includeExamplePlugins) =
67+
let (argsTesting, minPriority, logFilePath, includeExamplePlugins) =
6868
case args of
6969
Ghcide GhcideArguments{ argsTesting, argsDebugOn, argsLogFile, argsExamplePlugin } ->
7070
let minPriority = if argsDebugOn || argsTesting then Debug else Info
71-
in (minPriority, argsLogFile, argsExamplePlugin)
72-
_ -> (Info, Nothing, False)
71+
in (argsTesting, minPriority, argsLogFile, argsExamplePlugin)
72+
_ -> (False, Info, Nothing, False)
7373

7474
withDefaultRecorder logFilePath Nothing minPriority $ \textWithPriorityRecorder -> do
7575
let
@@ -85,7 +85,7 @@ main = do
8585
& cmapWithPrio (renderStrict . layoutPretty defaultLayoutOptions . fst)
8686
-- do not log heap stats to the LSP log as they interfere with the
8787
-- ability of lsp-test to detect a stuck server in tests and benchmarks
88-
& cfilter (not . heapStats . snd . payload)
88+
& if argsTesting then cfilter (not . heapStats . snd . payload) else id
8989
]
9090
plugins = (Plugins.idePlugins (cmapWithPrio LogPlugins recorder) includeExamplePlugins)
9191

0 commit comments

Comments
 (0)