forked from golang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp: fix references for transitive dependencies
We need to search all transitive dependencies of a package, not just its immediate imports. Fixes golang/go#38100 Change-Id: I15b4dbe226ba851691ca0c95460c3648ede32f04 Reviewed-on: https://go-review.googlesource.com/c/tools/+/227030 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Rohan Challa <rohan@golang.org>
- Loading branch information
1 parent
72cf467
commit 226fa68
Showing
5 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
13 changes: 13 additions & 0 deletions
13
internal/lsp/testdata/lsp/primarymod/references/another/another.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Package another has another type. | ||
package another | ||
|
||
import ( | ||
other "golang.org/x/tools/internal/lsp/references/other" | ||
) | ||
|
||
func _() { | ||
xes := other.GetXes() | ||
for _, x := range xes { | ||
_ = x.Y //@mark(anotherXY, "Y"),refs("Y", typeXY, anotherXY, GetXesY) | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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