Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore: Unify LsifStore.*SymbolUsages APIs into one#64076

Merged
varungandhi-src merged 4 commits into
mainfrom
vg/unify-BulkSymbolUsages
Jul 25, 2024
Merged

chore: Unify LsifStore.*SymbolUsages APIs into one#64076
varungandhi-src merged 4 commits into
mainfrom
vg/unify-BulkSymbolUsages

Conversation

@varungandhi-src

@varungandhi-src varungandhi-src commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

For precise usagesForSymbols, we want to propagate usages everywhere
(with associated symbol names, not just 'Location' values). This PR introduces
the new Usage type, and unifies the old GetBulkSymbolUsages and
GetMinimalBulkSymbolUsages APIs into a single GetSymbolUsages API.

We convert the Usage values to Location to avoid changing a lot of code at once.

We also change the DB query to do grouping and aggregation for us
instead of doing it in Go code.

Stepping stone for GRAPH-573

Test plan

Covered by existing tests

@cla-bot cla-bot Bot added the cla-signed label Jul 25, 2024
@github-actions github-actions Bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels Jul 25, 2024
@varungandhi-src varungandhi-src force-pushed the vg/unify-BulkSymbolUsages branch from b291c78 to b1dbff6 Compare July 25, 2024 09:34

@kritzcreek kritzcreek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small change for consistency, but otherwise looks great!

Comment thread internal/codeintel/codenav/internal/lsifstore/locations_by_position.go Outdated
Co-authored-by: Christoph Hegemann <christoph.hegemann@sourcegraph.com>
@varungandhi-src varungandhi-src merged commit cadb6d8 into main Jul 25, 2024
@varungandhi-src varungandhi-src deleted the vg/unify-BulkSymbolUsages branch July 25, 2024 12:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants