@@ -103,7 +103,6 @@ import Data.HashSet (HashSet)
103103import qualified Data.HashSet as Set
104104import qualified Data.Set as OS
105105import Database.SQLite.Simple
106- import Development.IDE.Core.Tracing (withTrace )
107106import Development.IDE.Core.WorkerThread (awaitRunInThread ,
108107 withWorkerQueue )
109108import qualified Development.IDE.GHC.Compat.Util as Compat
@@ -120,19 +119,13 @@ import qualified System.Random as Random
120119import System.Random (RandomGen )
121120import Text.ParserCombinators.ReadP (readP_to_S )
122121
123- import Control.Exception.Extra (errorIO )
124- import qualified Data.HashMap.Strict as HashMap
125- import qualified Data.Tuple as Tuple
126- import Development.IDE.Core.OfInterest (OfInterestVar (OfInterestVar ),
127- getFilesOfInterest ,
128- getFilesOfInterestUntracked )
129122import GHC.Data.Bag
130123import GHC.Driver.Env (hsc_all_home_unit_ids )
131124import GHC.Driver.Errors.Types
132125import GHC.Types.Error (errMsgDiagnostic ,
133126 singleMessage )
134127import GHC.Unit.State
135- import qualified HIE.Bios.Cradle as HieBios
128+
136129
137130data Log
138131 = LogSettingInitialDynFlags
@@ -733,26 +726,19 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
733726 -- to get some more options then we wait for the currently running action to finish
734727 -- before attempting to do so.
735728 let getOptionsBatch :: FilePath -> IO (IdeResult HscEnvEq , [FilePath ])
736- getOptionsBatch file' = do
729+ getOptionsBatch file = do
737730 pendingFiles <- atomically $ flushTQueue pendingFilesTQueue
738- let file = toAbsolutePath file'
739731 hieYaml <- cradleLoc file
740732 logWith recorder Debug LogSettingInitialDynFlags
741- results <- getOptionsList (Set. toList $ Set. fromList $ toAbsolutePath file : map fromNormalizedFilePath pendingFiles)
733+ results <- getOptionsList (Set. toList $ Set. fromList $ file : pendingFiles)
742734 return (results Map. ! file) `Safe.catch` \ e ->
743735 return (([renderPackageSetupException file e], Nothing ), maybe [] pure hieYaml)
744736
745737 returnWithVersion $ \ file -> do
746738 -- see Note [Serializing runs in separate thread]
747- atomically $ writeTQueue pendingFilesTQueue file
739+ atomically $ writeTQueue pendingFilesTQueue $ toAbsolutePath file
748740 awaitRunInThread que $ getOptionsBatch file
749741
750- -- cradleToType :: Cradle Void -> IO ()
751- -- cradleToType c = do
752- -- case c of
753- -- Cradle { cradleOptsProg = Just (GHC.GhcVersion _), cradleOptsProg = Just (GHC.GhcVersion _) } -> return ()
754- -- _ ->
755- -- return ()
756742
757743-- how we do batch loading of cradles depends on the the type of cradle we are using
758744cradleToOptsAndLibDirs :: Recorder (WithPriority Log ) -> SessionLoadingPreferenceConfig -> [(Cradle Void , (Maybe FilePath , FilePath ))] -> [FilePath ]
0 commit comments