Skip to content
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

KLS: Deal more gracefully with zero-width definition spans. #2944

Merged
merged 1 commit into from Aug 18, 2018

Conversation

creachadair
Copy link
Contributor

If an indexer emits a zero-width span by providing a start location without an
end, the language server will currently discard it because it lacks an end
marker. While this is not an ideal way for the indexer to represent
definitions, we can get a somewhat less surprising result by reusing the start
location as the end when the latter wasn't provided.

If an indexer emits a zero-width span by providing a start location without an
end, the language server will currently discard it because it lacks an end
marker. While this is not an ideal way for the indexer to represent
definitions, we can get a somewhat less surprising result by reusing the start
location as the end when the latter wasn't provided.
Copy link
Contributor

@danielmoy-google danielmoy-google left a comment

Choose a reason for hiding this comment

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

Guess it's better to be explicit.

@creachadair creachadair merged commit ba00741 into kythe:master Aug 18, 2018
@creachadair creachadair deleted the zerospan branch August 19, 2018 01:42
creachadair added a commit that referenced this pull request Aug 20, 2018
)

This is a follow-up to #2944. In addition to not throwing away empty spans from
the service, also ensure that when those spans are not discarded when they
don't get moved by remapping.
schroederc pushed a commit to schroederc/kythe that referenced this pull request Nov 8, 2018
If an indexer emits a zero-width span by providing a start location without an
end, the language server will currently discard it because it lacks an end
marker. While this is not an ideal way for the indexer to represent
definitions, we can get a somewhat less surprising result by reusing the start
location as the end when the latter wasn't provided.
schroederc pushed a commit to schroederc/kythe that referenced this pull request Nov 8, 2018
…the#2946)

This is a follow-up to kythe#2944. In addition to not throwing away empty spans from
the service, also ensure that when those spans are not discarded when they
don't get moved by remapping.
schroederc pushed a commit to schroederc/kythe that referenced this pull request Nov 8, 2018
If an indexer emits a zero-width span by providing a start location without an
end, the language server will currently discard it because it lacks an end
marker. While this is not an ideal way for the indexer to represent
definitions, we can get a somewhat less surprising result by reusing the start
location as the end when the latter wasn't provided.
schroederc pushed a commit to schroederc/kythe that referenced this pull request Nov 8, 2018
…the#2946)

This is a follow-up to kythe#2944. In addition to not throwing away empty spans from
the service, also ensure that when those spans are not discarded when they
don't get moved by remapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants