File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,8 @@ loadGhcSession = do
665
665
666
666
ghcSessionDepsDefinition :: NormalizedFilePath -> Action (IdeResult HscEnvEq )
667
667
ghcSessionDepsDefinition file = do
668
- hsc <- hscEnv <$> use_ GhcSession file
668
+ env <- use_ GhcSession file
669
+ let hsc = hscEnv env
669
670
(deps,_) <- useWithStale_ GetDependencies file
670
671
let tdeps = transitiveModuleDeps deps
671
672
ifaces <- uses_ GetModIface tdeps
@@ -679,7 +680,7 @@ ghcSessionDepsDefinition file = do
679
680
setupFinderCache (map hirModSummary ifaces)
680
681
mapM_ loadDepModule inLoadOrder
681
682
682
- res <- liftIO $ newHscEnvEq " " session' []
683
+ res <- liftIO $ newHscEnvEqWithImportPaths (envImportPaths env) session' []
683
684
return ([] , Just res)
684
685
685
686
getModIfaceFromDiskRule :: Rules ()
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ module Development.IDE.GHC.Util(
31
31
setHieDir ,
32
32
dontWriteHieFiles ,
33
33
disableWarningsAsErrors ,
34
- newHscEnvEqPreserveImportPaths ) where
34
+ newHscEnvEqPreserveImportPaths ,
35
+ newHscEnvEqWithImportPaths ) where
35
36
36
37
import Control.Concurrent
37
38
import Data.List.Extra
@@ -193,6 +194,11 @@ newHscEnvEq cradlePath hscEnv0 deps = do
193
194
hscEnv = removeImportPaths hscEnv0
194
195
return HscEnvEq {.. }
195
196
197
+ newHscEnvEqWithImportPaths :: Maybe [String ] -> HscEnv -> [(InstalledUnitId , DynFlags )] -> IO HscEnvEq
198
+ newHscEnvEqWithImportPaths envImportPaths hscEnv deps = do
199
+ envUnique <- newUnique
200
+ return HscEnvEq {.. }
201
+
196
202
-- | Wrap an 'HscEnv' into an 'HscEnvEq'.
197
203
newHscEnvEqPreserveImportPaths
198
204
:: HscEnv -> [(InstalledUnitId , DynFlags )] -> IO HscEnvEq
You can’t perform that action at this time.
0 commit comments