forked from facebookincubator/Glean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compute correct spans for xlang entities
Summary: Glass doesn't resolve entity locations and currently uses [the first line of the file](https://fb.workplace.com/groups/csi.eng/permalink/1825973911235009/) This diff modifies the DocumentSymbol/List methods handler so it - determines the idl db used by idl xrefs - fetches location from this db by using a custom glean query - updates the `toReferenceSymbol*` functions which convert the plain/idl xrefs (as Glean facts) to a common internal representation `XRefData` so they can execute in different RepoHaxl instances. This happens only for Cxx files which have idl xrefs, and won't have any effect in other cases. We only use the "entity" field of the codemarkup.IdlEntity to resolve the file/span. The other fields (file and span) may be used if want to support minimal xlang navigation for languages we don't index. ## Caveat - we don't enforce exact revision option for these xlang ref since in most cases, there won't be an exact match for both dbs. - Need to be a bit careful when comparing/querying entities from different dbs, the types don't help to know if an entity is fully evaluated or if we're using the facts ids in a wrong context - we don't generate digests for the idl db files (and we don't have digest on fbsource.fbthrift) Reviewed By: nhawkes Differential Revision: D55895695 fbshipit-source-id: 8348c09e548597cd13a432f964cd4e1e5813266a
- Loading branch information
1 parent
de16c5f
commit 2654ffe
Showing
5 changed files
with
151 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.