Skip to content

Conversation

@olafurpg
Copy link
Contributor

Previously, lsif-java only indexed the "Occurrences" section of a
SemanticDB TextDocument. Now, we additionall index the "Synthetics"
section, which includes inferred expression from Scala implicits, for
comprehensions, .apply methods and more. The benefit of this fix is
that "find references" on an implicit or an apply method now shows
usages where those symbols got inferred (the user didn't explicitly
write a reference to them).

It could be that this fix alone is not sufficient to enable "find
references" to show results on Sourcegraph. The Sourcegraph backend
will also need to accept offset ranges with zero length.

Fixes #340

Previously, lsif-java only indexed the "Occurrences" section of a
SemanticDB `TextDocument`. Now, we additionall index the "Synthetics"
section, which includes inferred expression from Scala implicits, for
comprehensions, `.apply` methods and more. The benefit of this fix is
that "find references" on an implicit or an `apply` method now shows
usages where those symbols got inferred (the user didn't explicitly
write a reference to them).

It could be that this fix alone is not sufficient to enable "find
references" to show results on Sourcegraph. The Sourcegraph backend
will also need to accept offset ranges with zero length.
@olafurpg olafurpg merged commit 8681738 into sourcegraph:main Sep 22, 2021
@olafurpg olafurpg deleted the synthetics branch September 22, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index symbol occurences from synthetics

1 participant