@@ -488,7 +488,7 @@ fetchDocumentSymbols
[email protected] {..} (FileReference scsrepo path)
488
488
fileId
489
489
-- todo this could be done in Glean in a single pass
490
490
(kinds, merr) <- withRepo fileRepo $
491
- documentSymbolKinds mlimit mlang fileId
491
+ documentSymbolKinds mlimit mlang fileId attrOpts
492
492
493
493
let revision = getDBRevision (scmRevisions dbInfo) fileRepo scsrepo
494
494
contentMatch <- case wantedRevision of
@@ -667,27 +667,29 @@ documentSymbolKinds
667
667
:: Maybe Int
668
668
-> Maybe Language
669
669
-> Glean. IdOf Src. File
670
+ -> AttributeOptions
670
671
-> Glean. RepoHaxl u w
671
672
([Attributes. AttrRep Attributes. SymbolKindAttr ], Maybe ErrorLogger )
672
673
673
674
-- It's not sound to key for all entities in file in C++ , due to traces
674
675
-- So we can't use the generic a attribute technique
675
- documentSymbolKinds _mlimit (Just Language_Cpp ) _fileId =
676
+ documentSymbolKinds _mlimit (Just Language_Cpp ) _fileId _ =
676
677
return mempty
677
678
678
679
-- Anything else, just load from Glean
679
- documentSymbolKinds mlimit _ fileId =
680
- searchFileAttributes Attributes. SymbolKindAttr mlimit fileId
680
+ documentSymbolKinds mlimit _ fileId attrOptions =
681
+ searchFileAttributes Attributes. SymbolKindAttr mlimit fileId attrOptions
681
682
682
683
searchFileAttributes
683
684
:: Attributes. ToAttributes key
684
685
=> key
685
686
-> Maybe Int
686
687
-> Glean. IdOf Src. File
688
+ -> AttributeOptions
687
689
-> Glean. RepoHaxl u w
688
690
([Attributes. AttrRep key ], Maybe ErrorLogger )
689
- searchFileAttributes key mlimit fileId = do
690
- eraw <- try $ Attributes. queryForFile key mlimit fileId
691
+ searchFileAttributes key mlimit fileId attrOpts = do
692
+ eraw <- try $ Attributes. queryForFile key mlimit fileId attrOpts
691
693
repo <- Glean. haxlRepo
692
694
case eraw of
693
695
Left (err:: SomeException ) -- logic errors or transient errors
@@ -918,6 +920,7 @@ getSymbolAttributes env dbInfo repo opts repofile mlimit
918
920
attrKey
919
921
(theGleanPath repofile)
920
922
mlimit
923
+ (requestOptions_attribute_opts opts)
921
924
return $ \ refs defs ->
922
925
case Attributes. augmentSymbols attrKey attrs refs defs
923
926
(requestOptions_attribute_opts opts) of
@@ -930,12 +933,13 @@ genericFetchFileAttributes
930
933
=> key
931
934
-> GleanPath
932
935
-> Maybe Int
936
+ -> AttributeOptions
933
937
-> RepoHaxl u w ([Attributes. AttrRep key ], Maybe ErrorLogger )
934
- genericFetchFileAttributes key path mlimit = do
938
+ genericFetchFileAttributes key path mlimit attrOptions = do
935
939
efile <- getFile path
936
940
repo <- Glean. haxlRepo
937
941
case efile of
938
942
Left err ->
939
943
return (mempty , Just (logError err <> logError repo))
940
944
Right fileId -> do
941
- searchFileAttributes key mlimit (Glean. getId fileId)
945
+ searchFileAttributes key mlimit (Glean. getId fileId) attrOptions
0 commit comments