Skip to content

Commit 5f183f6

Browse files
committed
Prevent GetParsedModule call for dependencies
1 parent 991f4bf commit 5f183f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ghcide/src/Development/IDE/LSP/Outline.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ moduleOutline
3939
moduleOutline ideState DocumentSymbolParams{ _textDocument = TextDocumentIdentifier uri }
4040
= liftIO $ case uriToFilePath uri of
4141
Just (toNormalizedFilePath' -> fp) -> do
42-
mb_decls <- fmap fst <$> runAction "Outline" ideState (useWithStale GetParsedModule fp)
42+
mb_decls <- case getSourceFileOrigin fp of
43+
FromDependency -> pure Nothing
44+
FromProject -> fmap fst <$> runAction "Outline" ideState (useWithStale GetParsedModule fp)
4345
pure $ Right $ case mb_decls of
4446
Nothing -> InL []
4547
Just ParsedModule { pm_parsed_source = L _ltop HsModule { hsmodName, hsmodDecls, hsmodImports } }

0 commit comments

Comments
 (0)