-
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/cache: fix handling of cgo standalone files
It is not a bug for go/packages to return no packages for standalone files, if they use cgo and cgo is disabled. There may also be other scenarios where standalone packages are not produced. In any case, downgrade the bug report to a normal error. Also, fix the failing test to require cgo. Fixes golang/go#70363 Fixes golang/go#70362 Change-Id: I2b8a8b3947e4d7ff6482279540638e13dc9de2b4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/628017 Reviewed-by: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
- Loading branch information
Showing
4 changed files
with
15 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,4 @@ import "golang.org/lsptests/a" | |
func main() { | ||
a.F() //@hovererr("F", "no package") | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
gopls/internal/test/marker/testdata/definition/standalone_issue64557.txt
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