@@ -148,6 +148,7 @@ data Log
148
148
| LogDLLLoadError ! String
149
149
| LogCradlePath ! FilePath
150
150
| LogCradlePaths ! [FilePath ]
151
+ | LogCradleOpts ! (ComponentOptions , FilePath , String )
151
152
| LogCradleNotFound ! FilePath
152
153
| LogSessionLoadingResult ! (Either [CradleError ] (ComponentOptions , FilePath , String ))
153
154
| LogCradle ! (Cradle Void )
@@ -234,6 +235,8 @@ instance Pretty Log where
234
235
" Session Loading config changed, reloading the full session."
235
236
LogNoneCradleFounds files ->
236
237
" None cradle found for files:" <+> pretty files <> " , ignoring the files"
238
+ LogCradleOpts (opts, root, prefix) ->
239
+ " Cradle options:" <+> pretty (componentOptions opts) <+> " , root:" <+> pretty root <+> " , prefix:" <+> pretty prefix
237
240
238
241
-- | Bump this version number when making changes to the format of the data stored in hiedb
239
242
hiedbDataVersion :: String
@@ -595,8 +598,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
595
598
-- For GHC's supporting multi component sessions, we create a shared
596
599
-- HscEnv but set the active component accordingly
597
600
hscEnv <- emptyHscEnv ideNc _libDir
598
- let new_cache = newComponentCache recorder optExtensions cfps hscEnv
599
- all_target_details <- new_cache old_deps new_deps
601
+ all_target_details <- newComponentCache recorder optExtensions cfps hscEnv old_deps new_deps
600
602
let all_targets' = concat all_target_details
601
603
flags_map' = HM. fromList (concatMap toFlagsMap all_targets')
602
604
this_dep_info <- getDependencyInfo $ maybeToList hieYaml
@@ -638,6 +640,7 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
638
640
-- The cradle gave us some options so get to work turning them
639
641
-- into and HscEnv.
640
642
Right (opts, libDir, version) -> do
643
+ logWith recorder Info $ LogCradleOpts (opts, libDir, version)
641
644
let compileTime = fullCompilerVersion
642
645
case reverse $ readP_to_S parseVersion version of
643
646
[] -> error $ " GHC version could not be parsed: " <> version
@@ -767,8 +770,6 @@ cradleToOptsAndLibDirs recorder loadConfig [] old_fps = error "cradleToOptsAndLi
767
770
cradleToOptsAndLibDirs recorder loadConfig cradleFiles@ (cr: crs) old_fps = do
768
771
-- let result :: [([FilePath], CradleLoadResult ComponentOptions)]
769
772
results <- HieBios. getCompilerOptionsInBatch (LoadWithContext old_fps) (second snd cr :| map (second snd ) crs)
770
- let resultMap :: Map. Map FilePath (CradleLoadResult ComponentOptions )
771
- resultMap = Map. fromList $ [ (fp, r) | (fps, r) <- results, fp <- fps ]
772
773
mapM (\ (fps, crr) -> collectBiosResult'' recorder (getFirstCradle fps cradleFiles) fps crr) results
773
774
where
774
775
getFirstCradle :: [FilePath ] -> [(Cradle Void , (Maybe FilePath , FilePath ))] -> (Cradle Void , Maybe FilePath )
0 commit comments