Skip to content

Commit 816fdec

Browse files
Catherine Gasnierfacebook-github-bot
authored andcommitted
scip symbol = USR
Summary: High-level goal: use glass as a remote index store for sourcekit LSP. To that end, the next diff add thrift method usrToDefinition which takes a sourcekit USR (unique symbol identifier in clang/swift) and return the symbol definition. This means glean needs to store USR in the scip schema somewhere. Currently, we use as scip.Symbol a string like `scip . path/to/symbol/target . USR`. There was no strong motivation to use that format, it does not even comply with the SCIP specification for symbol IDs [here](https://github.com/sourcegraph/scip/blob/main/scip.proto#L147). So instead I'm using just a plain USR which should be unique by design. Differential Revision: D74489678 fbshipit-source-id: 3857e7e2482d1722fccb20c8c0148a79c6d51baf
1 parent 89ecb94 commit 816fdec

File tree

2 files changed

+356
-677
lines changed

2 files changed

+356
-677
lines changed

glean/lang/swift/Glean/Indexer/Swift.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ indexer = Indexer {
4747
[ "--output-dir", outDir
4848
, "--target", target
4949
, "--swift-only"
50-
, "--output-type", "scip" ],
50+
, "--output-type", "scip"
51+
, "--build-indexer" ],
5152
scipRoot = indexerRoot,
5253
scipWritesLocal = False,
5354
scipLanguage = Just SCIP.Swift

0 commit comments

Comments
 (0)