@@ -811,20 +811,19 @@ fromTargetId :: [FilePath] -- ^ import paths
811
811
-> TargetId
812
812
-> IdeResult HscEnvEq
813
813
-> DependencyInfo
814
- -> FilePath -- ^ root dir, see Note [Root Directory]
815
814
-> IO [TargetDetails ]
816
815
-- For a target module we consider all the import paths
817
- fromTargetId is exts (GHC. TargetModule modName) env dep dir = do
816
+ fromTargetId is exts (GHC. TargetModule modName) env dep = do
818
817
let fps = [i </> moduleNameSlashes modName -<.> ext <> boot
819
818
| ext <- exts
820
819
, i <- is
821
820
, boot <- [" " , " -boot" ]
822
821
]
823
- let locs = fmap ( toNormalizedFilePath' . toAbsolute dir) fps
822
+ let locs = fmap toNormalizedFilePath' fps
824
823
return [TargetDetails (TargetModule modName) env dep locs]
825
824
-- For a 'TargetFile' we consider all the possible module names
826
- fromTargetId _ _ (GHC. TargetFile f _) env deps dir = do
827
- let nf = toNormalizedFilePath' $ toAbsolute dir f
825
+ fromTargetId _ _ (GHC. TargetFile f _) env deps = do
826
+ let nf = toNormalizedFilePath' f
828
827
let other
829
828
| " -boot" `isSuffixOf` f = toNormalizedFilePath' (L. dropEnd 5 $ fromNormalizedFilePath nf)
830
829
| otherwise = toNormalizedFilePath' (fromNormalizedFilePath nf ++ " -boot" )
@@ -985,7 +984,7 @@ newComponentCache recorder exts cradlePath _cfp hsc_env old_cis new_cis dir = do
985
984
logWith recorder Debug $ LogNewComponentCache (targetEnv, targetDepends)
986
985
evaluate $ liftRnf rwhnf $ componentTargets ci
987
986
988
- let mk t = fromTargetId (importPaths df) exts (targetId t) targetEnv targetDepends dir
987
+ let mk t = fromTargetId (importPaths df) exts (targetId t) targetEnv targetDepends
989
988
ctargets <- concatMapM mk (componentTargets ci)
990
989
991
990
return (L. nubOrdOn targetTarget ctargets)
0 commit comments