@@ -52,7 +52,7 @@ import Development.IDE.Core.RuleTypes (GenerateCore (Generat
5252 GetHieAst (GetHieAst ),
5353 TypeCheck (TypeCheck ))
5454import Development.IDE.Core.Service (initialise ,
55- runAction )
55+ runAction , ShakeOpQueue , runWithShake )
5656import qualified Development.IDE.Core.Service as Service
5757import Development.IDE.Core.Shake (IdeState (shakeExtras ),
5858 IndexQueue ,
@@ -309,8 +309,8 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
309309 logWith recorder Info $ LogLspStart (pluginId <$> ipMap argsHlsPlugins)
310310
311311 ideStateVar <- newEmptyMVar
312- let getIdeState :: LSP. LanguageContextEnv Config -> Maybe FilePath -> WithHieDb -> IndexQueue -> IO IdeState
313- getIdeState env rootPath withHieDb hieChan = do
312+ let getIdeState :: LSP. LanguageContextEnv Config -> Maybe FilePath -> WithHieDb -> IndexQueue -> ShakeOpQueue -> IO IdeState
313+ getIdeState env rootPath withHieDb hieChan sq = do
314314 traverse_ IO. setCurrentDirectory rootPath
315315 t <- ioT
316316 logWith recorder Info $ LogLspStartDuration t
@@ -349,6 +349,7 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
349349 ideOptions
350350 withHieDb
351351 hieChan
352+ sq
352353 monitoring
353354 putMVar ideStateVar ide
354355 pure ide
@@ -373,7 +374,7 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
373374 Check argFiles -> do
374375 dir <- maybe IO. getCurrentDirectory return argsProjectRoot
375376 dbLoc <- getHieDbLoc dir
376- runWithDb (cmapWithPrio LogSession recorder) dbLoc $ \ hiedb hieChan -> do
377+ runWithShake $ \ sq -> runWithDb (cmapWithPrio LogSession recorder) dbLoc $ \ hiedb hieChan -> do
377378 -- GHC produces messages with UTF8 in them, so make sure the terminal doesn't error
378379 hSetEncoding stdout utf8
379380 hSetEncoding stderr utf8
@@ -401,7 +402,7 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
401402 , optCheckProject = pure False
402403 , optModifyDynFlags = optModifyDynFlags def_options <> pluginModifyDynflags plugins
403404 }
404- ide <- initialise (cmapWithPrio LogService recorder) argsDefaultHlsConfig argsHlsPlugins rules Nothing debouncer ideOptions hiedb hieChan mempty
405+ ide <- initialise (cmapWithPrio LogService recorder) argsDefaultHlsConfig argsHlsPlugins rules Nothing debouncer ideOptions hiedb hieChan sq mempty
405406 shakeSessionInit (cmapWithPrio LogShake recorder) ide
406407 registerIdeConfiguration (shakeExtras ide) $ IdeConfiguration mempty (hashed Nothing )
407408
@@ -431,15 +432,15 @@ defaultMain recorder Arguments{..} = withHeapStats (cmapWithPrio LogHeapStats re
431432 Custom (IdeCommand c) -> do
432433 root <- maybe IO. getCurrentDirectory return argsProjectRoot
433434 dbLoc <- getHieDbLoc root
434- runWithDb (cmapWithPrio LogSession recorder) dbLoc $ \ hiedb hieChan -> do
435+ runWithShake $ \ sq -> runWithDb (cmapWithPrio LogSession recorder) dbLoc $ \ hiedb hieChan -> do
435436 sessionLoader <- loadSessionWithOptions (cmapWithPrio LogSession recorder) argsSessionLoadingOptions " ."
436437 let def_options = argsIdeOptions argsDefaultHlsConfig sessionLoader
437438 ideOptions = def_options
438439 { optCheckParents = pure NeverCheck
439440 , optCheckProject = pure False
440441 , optModifyDynFlags = optModifyDynFlags def_options <> pluginModifyDynflags plugins
441442 }
442- ide <- initialise (cmapWithPrio LogService recorder) argsDefaultHlsConfig argsHlsPlugins rules Nothing debouncer ideOptions hiedb hieChan mempty
443+ ide <- initialise (cmapWithPrio LogService recorder) argsDefaultHlsConfig argsHlsPlugins rules Nothing debouncer ideOptions hiedb hieChan sq mempty
443444 shakeSessionInit (cmapWithPrio LogShake recorder) ide
444445 registerIdeConfiguration (shakeExtras ide) $ IdeConfiguration mempty (hashed Nothing )
445446 c ide
0 commit comments