-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/lsp/source: hovering over broken packages is not an error
Fixes golang/go#64237 Change-Id: I5b326e084c31a7835684fb08491bd71af606fb1c Reviewed-on: https://go-review.googlesource.com/c/tools/+/549117 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
- Loading branch information
Showing
5 changed files
with
46 additions
and
22 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
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 was deleted.
Oops, something went wrong.
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,22 @@ | ||
This test verifies fixes for various issues reported for hover. | ||
|
||
-- go.mod -- | ||
module golang.org/lsptests | ||
|
||
-- issue64239/p.go -- | ||
package issue64239 | ||
|
||
// golang/go#64239: hover fails for objects in the unsafe package. | ||
|
||
import "unsafe" | ||
|
||
var _ = unsafe.Sizeof(struct{}{}) //@hover("Sizeof", "Sizeof", "`Sizeof` on pkg.go.dev") | ||
|
||
-- issue64237/p.go -- | ||
package issue64237 | ||
|
||
// golang/go#64237: hover panics for broken imports. | ||
|
||
import "golang.org/lsptests/nonexistant" //@diag("\"golang", re"could not import") | ||
|
||
var _ = nonexistant.Value //@hovererr("nonexistant", "no package data") |