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/playground: fail to build with Go tip since CL 603476 #68999

Closed
cherrymui opened this issue Aug 21, 2024 · 5 comments
Closed

x/playground: fail to build with Go tip since CL 603476 #68999

cherrymui opened this issue Aug 21, 2024 · 5 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@cherrymui
Copy link
Member

cherrymui commented Aug 21, 2024

It started to fail consistently since CL 603476 (on the main repo).
E.g. https://ci.chromium.org/ui/p/golang/builders/ci/x_playground-gotip-linux-amd64/b8738967458806380001/overview
https://logs.chromium.org/logs/golang/buildbucket/cr-buildbucket/8738967458806380001/+/u/step/18/log/2

Apparently some tests need fix to make the new vet happy.

cc @adonovan @toothrot

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2024
@cherrymui cherrymui added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 21, 2024
@gabyhelp
Copy link

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@ianlancetaylor
Copy link
Member

These invalid names are intentionally chosen. Not sure what we should do here.

// TestisNotATest is not a test function, despite appearances.
//
// Please ignore any lint or vet warnings for this function.
func TestisNotATest(t *testing.T) {
	panic("This is not a valid test function.")
}

@cherrymui
Copy link
Member Author

Interesting. Maybe we can set the x/playground repo to run with GOFLAGS=-vet=off (or some flag to just disable the -tests check, if possible)? Or move those not-a-test functions to testdata?

@adonovan
Copy link
Member

For the tests of ill-formed Test functions in GOROOT, I added -vet=off to the go test commands as needed. Unfortunately in this case the design of the test mixes the (sound) test harness and the (invalid) code under test in the same source file. Really the latter code should be split into a separate file beneath testdata (as @cherrymui said). Unfortunately that's not a quick fix.

@adonovan adonovan self-assigned this Aug 22, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/607835 mentions this issue: TestIsTest: move ill-formed tests into a testdata subpackage

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.
Projects
None yet
Development

No branches or pull requests

5 participants