Repository navigation
Resolve the extendee of an extend block in the LSP - #4811
Merged
Merged
Conversation
Go-to-definition on the message an extend block extends, such as google.protobuf.FieldOptions in extend google.protobuf.FieldOptions, found nothing, and that message's references didn't include its extend blocks: an extension's symbol spans its own name, and nothing spanned the extendee. Give each extend block, nested ones included, a reference symbol to the extended message, as a field's type has.
douzebis
force-pushed
the
lsp-extendee
branch
from
November 30, 2026 20:50
24a42d9 to
7319a07
Compare
emcfarlane
approved these changes
Dec 2, 2026
pkwarren
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go-to-definition on the message named in an extend block found nothing. For example, nothing happened on FieldOptions in:
References from that message's declaration also left out its extend blocks.
An extension's symbol spans only the extension's own name, so nothing spanned the extended message. Each extend block, including ones nested in messages, now indexes the extended message's name as a reference to its declaration, like a field's type.
Not covered: renaming a message replaces a qualified name such as extend other.v1.Base with just the new name, which drops the package. Qualified field types already have the same problem, so it needs a separate fix in rename.
Fixes #4810.