Skip to content

Fix --testing #3113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/Ide/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,15 @@ runLspMode recorder ghcideArgs@GhcideArguments{..} idePlugins = withTelemetryLog

-- exists so old-style logging works. intended to be phased out
let logger = Logger $ \p m -> logger_ recorder (WithPriority p emptyCallStack $ LogOther m)
args = (if argsTesting then IDEMain.testing else IDEMain.defaultArguments)
(cmapWithPrio LogIDEMain recorder) logger

IDEMain.defaultMain (cmapWithPrio LogIDEMain recorder) (IDEMain.defaultArguments (cmapWithPrio LogIDEMain recorder) logger)
IDEMain.defaultMain (cmapWithPrio LogIDEMain recorder) args
{ IDEMain.argCommand = argsCommand
, IDEMain.argsHlsPlugins = idePlugins
, IDEMain.argsHlsPlugins = IDEMain.argsHlsPlugins args <> idePlugins
, IDEMain.argsLogger = pure logger <> pure telemetryLogger
, IDEMain.argsThreads = if argsThreads == 0 then Nothing else Just $ fromIntegral argsThreads
, IDEMain.argsIdeOptions = \_config sessionLoader ->
let defOptions = Ghcide.defaultIdeOptions sessionLoader
in defOptions
{ Ghcide.optShakeProfiling = argsShakeProfiling
, Ghcide.optTesting = Ghcide.IdeTesting argsTesting
}
, IDEMain.argsIdeOptions = \config sessionLoader ->
let defOptions = IDEMain.argsIdeOptions args config sessionLoader
in defOptions { Ghcide.optShakeProfiling = argsShakeProfiling }
}