Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/analysis/unitchecker,slices: TestVetStdlib failing due to vet errors in panic tests #64978

Closed
bcmills opened this issue Jan 5, 2024 · 6 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jan 5, 2024

Go version

8db1310

Output of go env in your module/workspace:

linux-arm64-longtest at 8db131082d08e497fd8e9383d0ff7715e1bef478 building tools at ba8672b53f4b6840528df6fd534cb16f65278711

:: Running /tmp/workdir/go/bin/go with args ["/tmp/workdir/go/bin/go" "test" "-timeout=50m0s" "./..."] and env ["HOSTNAME=fc37d78d0c48" "HOME=/root" "SHLVL=0" "DEBIAN_FRONTEND=noninteractive" "USER=root" "GO_STAGE0_NET_DELAY=0s" "GO_STAGE0_DL_DELAY=200ms" "WORKDIR=/tmp/workdir" "GOROOT_BOOTSTRAP=/tmp/workdir/go1.4" "GO_BUILDER_NAME=linux-arm64-longtest" "GO_TEST_SHORT=0" "GO_TEST_TIMEOUT_SCALE=5" "GOROOT=/tmp/workdir/go" "GOPATH=/tmp/workdir/gopath" "GOPROXY=http://gk3-services-nap-jetxd907-8f582974-hv4r.c.symbolic-datum-552.internal:30157" "TMPDIR=/tmp/workdir/tmp" "GOCACHE=/tmp/workdir/gocache" "GOPLSCACHE=/tmp/workdir/goplscache" "PATH=/tmp/workdir/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" "PWD=/tmp/workdir/gopath/src/golang.org/x/tools"] in dir /tmp/workdir/gopath/src/golang.org/x/tools

What did you do?

https://build.golang.org/log/2ee364aaab909e8dcc3be5bd1c45c1aa12dc8151

What did you see happen?

--- FAIL: TestVetStdlib (39.88s)
    vet_std_test.go:99: go vet std failed (exit status 1):
        # slices_test
        # [slices_test]
        /tmp/workdir/go/src/slices/slices_test.go:560:29: result of slices.Insert call not used
        /tmp/workdir/go/src/slices/slices_test.go:687:29: result of slices.Delete call not used
        /tmp/workdir/go/src/slices/slices_test.go:909:49: result of slices.Grow call not used
        /tmp/workdir/go/src/slices/slices_test.go:912:49: result of slices.Grow call not used
        /tmp/workdir/go/src/slices/slices_test.go:924:7: result of slices.Grow call not used
        /tmp/workdir/go/src/slices/slices_test.go:1040:30: result of slices.Replace call not used
FAIL
FAIL	golang.org/x/tools/go/analysis/unitchecker	48.138s

What did you expect to see?

All tests passing. (I believe this can be fixed by explicitly assigning to _ in the panic tests in slices_test.go.)

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jan 5, 2024
@gopherbot gopherbot added this to the Unreleased milestone Jan 5, 2024
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 5, 2024
@bcmills bcmills modified the milestones: Unreleased, Go1.22 Jan 5, 2024
@adonovan
Copy link
Member

adonovan commented Jan 5, 2024

Sorry, I did it again: I forgot that any change to the behavior of vet needs more thorough rollout. Will fix presently.

@gopherbot
Copy link

Change https://go.dev/cl/554196 mentions this issue: slices: explicitly discard results of some functions

cpuguy83 pushed a commit to cpuguy83/go that referenced this issue Jan 6, 2024
This will otherwise trigger an "unusedresult" vet check.

Fixes golang#64978

Change-Id: Ie19aded0f808d394f389452c3ff7f3edc1ed710d
Reviewed-on: https://go-review.googlesource.com/c/go/+/554196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
@bcmills
Copy link
Contributor Author

bcmills commented Jan 8, 2024

Fixed in https://go.dev/cl/554196.

@bcmills bcmills closed this as completed Jan 8, 2024
@dmitshur
Copy link
Contributor

dmitshur commented Jan 8, 2024

@gopherbot Please backport to Go 1.21. This is a test-only fix that'll fix longtest builders.

@gopherbot
Copy link

Backport issue(s) opened: #65023 (for 1.21).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link

Change https://go.dev/cl/554756 mentions this issue: [release-branch.go1.21] slices: explicitly discard results of some functions

gopherbot pushed a commit that referenced this issue Jan 10, 2024
…nctions

This will otherwise trigger an "unusedresult" vet check.

For #64978.
Fixes #65023.
Fixes #60058.

Change-Id: Ie19aded0f808d394f389452c3ff7f3edc1ed710d
Reviewed-on: https://go-review.googlesource.com/c/go/+/554196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 8088b6d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/554756
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
This will otherwise trigger an "unusedresult" vet check.

Fixes golang#64978

Change-Id: Ie19aded0f808d394f389452c3ff7f3edc1ed710d
Reviewed-on: https://go-review.googlesource.com/c/go/+/554196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants