File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ captureSplicesAndDeps TypecheckHelpers{..} env k = do
361361#if MIN_VERSION_ghc(9,3,0)
362362 -- TODO: support backpack
363363 nodeKeyToInstalledModule :: NodeKey -> Maybe InstalledModule
364+ nodeKeyToInstalledModule (NodeKey_Module (ModNodeKeyWithUid (GWIB mod IsBoot ) uid)) = Nothing
364365 nodeKeyToInstalledModule (NodeKey_Module (ModNodeKeyWithUid (GWIB mod _) uid)) = Just $ mkModule uid mod
365366 nodeKeyToInstalledModule _ = Nothing
366367 moduleToNodeKey :: Module -> NodeKey
@@ -1073,11 +1074,16 @@ mergeEnvs env (ms, deps) extraMods envs = do
10731074 combineModules a b
10741075 | HsSrcFile <- mi_hsc_src (hm_iface a) = a
10751076 | otherwise = b
1077+
1078+ -- Prefer non-boot files
1079+ combineModuleLocations a@ (InstalledFound ml m) b | Just fp <- ml_hs_file ml, not (" boot" `isSuffixOf` fp) = a
1080+ combineModuleLocations _ b = b
1081+
10761082 concatFC :: FinderCacheState -> [FinderCache ] -> IO FinderCache
10771083 concatFC cur xs = do
10781084 fcModules <- mapM (readIORef . fcModuleCache) xs
10791085 fcFiles <- mapM (readIORef . fcFileCache) xs
1080- fcModules' <- newIORef $! foldl' (plusInstalledModuleEnv const ) cur fcModules
1086+ fcModules' <- newIORef $! foldl' (plusInstalledModuleEnv combineModuleLocations ) cur fcModules
10811087 fcFiles' <- newIORef $! Map. unions fcFiles
10821088 pure $ FinderCache fcModules' fcFiles'
10831089
You can’t perform that action at this time.
0 commit comments