sourcegraph/internal/codeintel/core
Varun Gandhi be0cd097f5
Correctly re-map source ranges in new SCIP-based APIs (#63630)
This PR fixes the following:
- Handles source range translation in the occurrences API
  (Fixes https://linear.app/sourcegraph/issue/GRAPH-705)
- Handles range translation when comparing with document occurrences in
   search-based and syntactic usagesForSymbol implementations

Throwing this PR up in its current state as I think adding the bulk
conversion
API will be a somewhat complex task, so we should split them into
separate
PRs anyways, and I don't have time to continue working on this right
now.

Some design notes:
- We want to avoid passing around full CompletedUpload and RequestState
objects,
which is why I chose to create a smaller UploadSummary type and decided
to pass
around GitTreeTranslator as that is the minimal thing we need to handle
range re-mapping.
- Yes, this PR increases the surface of the UploadLike type, but I think
it's still quite manageable.

## Test plan

manual testing, existing tests on gittreetranslator
---------

Co-authored-by: Christoph Hegemann <christoph.hegemann@sourcegraph.com>
2024-07-11 06:55:46 +00:00
..
BUILD.bazel Correctly re-map source ranges in new SCIP-based APIs (#63630) 2024-07-11 06:55:46 +00:00
option_test.go Adds Option for codeintel (#63637) 2024-07-04 10:55:59 +00:00
option.go Adds Option for codeintel (#63637) 2024-07-04 10:55:59 +00:00
paths.go Correctly re-map source ranges in new SCIP-based APIs (#63630) 2024-07-11 06:55:46 +00:00
upload.go Correctly re-map source ranges in new SCIP-based APIs (#63630) 2024-07-11 06:55:46 +00:00