mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-02 08:53:07 +03:00
Use argsVerbose to determine log level in test mode (#717)
This commit is contained in:
parent
9f1f55410b
commit
271c6e0ea7
@ -136,9 +136,10 @@ main = do
|
||||
putStrLn "\nStep 3/4: Initializing the IDE"
|
||||
vfs <- makeVFSHandle
|
||||
debouncer <- newAsyncDebouncer
|
||||
let dummyWithProg _ _ f = f (const (pure ()))
|
||||
let logLevel = if argsVerbose then minBound else Info
|
||||
dummyWithProg _ _ f = f (const (pure ()))
|
||||
sessionLoader <- loadSession dir
|
||||
ide <- initialise def mainRule (pure $ IdInt 0) (showEvent lock) dummyWithProg (const (const id)) (logger minBound) debouncer (defaultIdeOptions sessionLoader) vfs
|
||||
ide <- initialise def mainRule (pure $ IdInt 0) (showEvent lock) dummyWithProg (const (const id)) (logger logLevel) debouncer (defaultIdeOptions sessionLoader) vfs
|
||||
|
||||
putStrLn "\nStep 4/4: Type checking the files"
|
||||
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath' files
|
||||
@ -169,4 +170,3 @@ showEvent _ (EventFileDiagnostics _ []) = return ()
|
||||
showEvent lock (EventFileDiagnostics (toNormalizedFilePath' -> file) diags) =
|
||||
withLock lock $ T.putStrLn $ showDiagnosticsColored $ map (file,ShowDiag,) diags
|
||||
showEvent lock e = withLock lock $ print e
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user