@@ -523,22 +523,17 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} rootDir que = do
523
523
_inplace = map rawComponentUnitId $ NE. toList all_deps
524
524
525
525
all_deps' <- forM all_deps $ \ RawComponentInfo {.. } -> do
526
- -- Remove all inplace dependencies from package flags for
527
- -- components in this HscEnv
528
- let (df2, uids) = (rawComponentDynFlags, [] )
529
526
let prefix = show rawComponentUnitId
530
527
-- See Note [Avoiding bad interface files]
531
- let hscComponents = sort $ map show uids
532
- cacheDirOpts = hscComponents ++ componentOptions opts
528
+ let cacheDirOpts = componentOptions opts
533
529
cacheDirs <- liftIO $ getCacheDirs prefix cacheDirOpts
534
- processed_df <- setCacheDirs recorder cacheDirs df2
530
+ processed_df <- setCacheDirs recorder cacheDirs rawComponentDynFlags
535
531
-- The final component information, mostly the same but the DynFlags don't
536
532
-- contain any packages which are also loaded
537
533
-- into the same component.
538
534
pure $ ComponentInfo
539
535
{ componentUnitId = rawComponentUnitId
540
536
, componentDynFlags = processed_df
541
- , componentInternalUnits = uids
542
537
, componentTargets = rawComponentTargets
543
538
, componentFP = rawComponentFP
544
539
, componentCOptions = rawComponentCOptions
@@ -1017,10 +1012,6 @@ data ComponentInfo = ComponentInfo
1017
1012
-- | Processed DynFlags. Does not contain inplace packages such as local
1018
1013
-- libraries. Can be used to actually load this Component.
1019
1014
, componentDynFlags :: DynFlags
1020
- -- | Internal units, such as local libraries, that this component
1021
- -- is loaded with. These have been extracted from the original
1022
- -- ComponentOptions.
1023
- , componentInternalUnits :: [UnitId ]
1024
1015
-- | All targets of this components.
1025
1016
, componentTargets :: [GHC. Target ]
1026
1017
-- | Filepath which caused the creation of this component
0 commit comments