Skip to content

Emit inverse relationships #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2023
Merged

Emit inverse relationships #566

merged 2 commits into from
May 2, 2023

Conversation

olafurpg
Copy link
Member

Fixes #413. Previously, "find references" and "find implementations" didn't work as expected with Sourcegraph 5.0 due to https://github.com/sourcegraph/sourcegraph/issues/50927.

This PR is a workaround until that issue gets fixed so that users can index with scip-java and get the best possible navigation experience.

Test plan

See updated snapshots.

Fixes #413. Previously, "find references" and "find implementations"
didn't work as expected with Sourcegraph 5.0 due to
https://github.com/sourcegraph/sourcegraph/issues/50927.

This PR is a workaround until that issue gets fixed so that users can
index with scip-java and get the best possible navigation experience.
@olafurpg olafurpg requested a review from keynmol April 27, 2023 13:46
Comment on lines +37 to +44
// relationship is_reference is_implementation ujson/IndexedValue.Arr#index.
// relationship is_reference is_implementation ujson/IndexedValue.False#index.
// relationship is_reference is_implementation ujson/IndexedValue.Null#index.
// relationship is_reference is_implementation ujson/IndexedValue.Num#index.
// relationship is_reference is_implementation ujson/IndexedValue.NumRaw#index.
// relationship is_reference is_implementation ujson/IndexedValue.Obj#index.
// relationship is_reference is_implementation ujson/IndexedValue.Str#index.
// relationship is_reference is_implementation ujson/IndexedValue.True#index.
Copy link
Contributor

Choose a reason for hiding this comment

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

Implementation-wise I think the PR is fine, I'm just concerned about plugging the holes in the backend with something that increases the size of the SCIP index.

This example is probably on the extreme end of the spectrum

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not so concerned about index size getting bloated from this change. These relationships represent a tiny part of the payload since most of the overhead comes from basic occurrences (just a single import statement can emit 5-6 occurrences). Symbols also have a lot of redundancy that gets compressed away.

@olafurpg olafurpg requested a review from keynmol May 1, 2023 07:08
@olafurpg olafurpg enabled auto-merge May 1, 2023 07:42
@olafurpg olafurpg merged commit f36c68a into main May 2, 2023
@keynmol keynmol deleted the olafurpg/reference-bijection branch May 2, 2023 07:50
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.

Missing Scala Precise Code Intelligence when Overriding Fields
2 participants