[tools] gopls/internal/golang: add util function NarrowestDeclaringPackage

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 3, 2025, 8:59:16 PM (6 hours ago) Dec 3
to Hongxiang Jiang, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Alan Donovan, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
gopls/internal/golang: add util function NarrowestDeclaringPackage

In complicated static analysis, gopls sometimes need to type check
the second package which contains the decl of an interested obj.
This utility function help gopls to easily type check the second
package which contains the decl of given object.
Change-Id: I96d5dd72661dbcdda611c44490bba096819dc6f2
Auto-Submit: Hongxiang Jiang <hxj...@golang.org>
Reviewed-by: Alan Donovan <adon...@google.com>
Auto-Submit: Alan Donovan <adon...@google.com>
Files:
  • M gopls/internal/golang/call_hierarchy.go
  • M gopls/internal/golang/hover.go
  • M gopls/internal/golang/inline.go
  • M gopls/internal/golang/snapshot.go
Change size: M
Delta: 4 files changed, 38 insertions(+), 41 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I96d5dd72661dbcdda611c44490bba096819dc6f2
Gerrit-Change-Number: 726180
Gerrit-PatchSet: 5
Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages