Skip to content

x/tools/internal/gcimporter: TestImportTypeparamTests depends on GOROOT/test/typeparam #70081

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

Closed
hyangah opened this issue Oct 28, 2024 · 3 comments
Assignees
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Oct 28, 2024

https://github.com/golang/tools/blob/73d6794ebbd4a16f44bdf838c2aa5fe79a63830d/internal/gcimporter/gcimporter_test.go#L197

I don't know if this test is still relevant. But I noticed that this test tries to read the directory runtime.GOROOT()/test/typeparam.
However, this test/typeparam directory does not exist in the toolchain module downloaded from the module proxy.

For example, inspect https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.22.0.darwin-amd64.zip

So, if the test runs with the toolchain downloaded from the module proxy (with toolchain switch), that can cause test failure.

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 28, 2024
@gopherbot gopherbot added this to the Unreleased milestone Oct 28, 2024
@hyangah
Copy link
Contributor Author

hyangah commented Oct 28, 2024

Gaby found CL 504117 added for go/internal/gcimporter: skip TestImportTypeparamTests if GOROOT/test is missing. x/tools/internal/gcimporter needs it too.

@findleyr findleyr self-assigned this Oct 28, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/622896 mentions this issue: all: fix x/tools tests that fail with a go1.23.1 go.work file

apstndb pushed a commit to apstndb/gotoolsdiff that referenced this issue Jan 11, 2025
Delete or selectively skip tests that made either of the following
assumptions:
- The default GODEBUG is that of Go 1.22 (not true given a go.work
  file).
- GOROOT is a development version of Go (not true if GOROOT is prepared
  by cmd/distpack).

Fixes golang/go#70081
Fixes golang/go#70082

Change-Id: I47dfb225427f75e3be833eed3ba677ff454935f1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/622896
Reviewed-by: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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