Skip to content

Commit

Permalink
go/packages: run TestIssue70394 with Go 1.23
Browse files Browse the repository at this point in the history
It's expected to pass now that the CL 631855 cherry-pick is submitted.

Also apply gofmt after CL 637961 while here.

For golang/go#70394.

Change-Id: I436b24f86669af7c9a2ff06703732018ab2a9ffc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/640017
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Tim King <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
  • Loading branch information
dmitshur authored and gopherbot committed Jan 7, 2025
1 parent 16f2979 commit b4e093e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/packages/packages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3157,8 +3157,7 @@ func TestIssue69606b(t *testing.T) {
// in another package (m/b) where the types for m/b are coming from the compiler,
// e.g. `go list -compiled=true ... m/b`.
func TestIssue70394(t *testing.T) {
// TODO(taking): backport https://go.dev/cl/604099 so that this works on 23.
testenv.NeedsGo1Point(t, 24)
testenv.NeedsGo1Point(t, 23)
testenv.NeedsTool(t, "go") // requires go list.
testenv.NeedsGoBuild(t) // requires the compiler for export data.

Expand Down Expand Up @@ -3339,7 +3338,7 @@ func main() {

pkgs, err := packages.Load(&packages.Config{
Mode: packages.NeedName | packages.NeedTarget,
Env: append(os.Environ(), "GOPATH=" + gopath, "GO111MODULE=off"),
Env: append(os.Environ(), "GOPATH="+gopath, "GO111MODULE=off"),
}, filepath.Join(gopath, "src", "..."))
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit b4e093e

Please sign in to comment.