Skip to content

Commit e380aad

Browse files
authored
Fix regression in getSpanInfoRule (#622)
This rule used withstale dependencies prior to #457 and was changed to plain use for no good reason, which makes hovers unavailable when a dependency doesn't typecheck
1 parent f766e55 commit e380aad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Development/IDE/Core/Rules.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ getSpanInfoRule =
451451
#if MIN_GHC_API_VERSION(8,6,0) && !defined(GHC_LIB)
452452
let parsedDeps = []
453453
#else
454-
parsedDeps <- uses_ GetParsedModule tdeps
454+
parsedDeps <- mapMaybe (fmap fst) <$> usesWithStale GetParsedModule tdeps
455455
#endif
456456

457-
ifaces <- uses_ GetModIface tdeps
457+
ifaces <- mapMaybe (fmap fst) <$> usesWithStale GetModIface tdeps
458458
(fileImports, _) <- use_ GetLocatedImports file
459459
let imports = second (fmap artifactFilePath) <$> fileImports
460460
x <- liftIO $ getSrcSpanInfos packageState imports tc parsedDeps (map hirModIface ifaces)

0 commit comments

Comments
 (0)