x/tools/go/packages: _test packages cannot be loaded directly #66444
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Go version
go version go1.22.0 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
go.mod
example2/main.go
example2/nested/example.go
example2/nested/example_test.go
example2/nested/example_external_test.go
In the
example2
directory, rango run main.go
What did you see happen?
Output:
What did you expect to see?
From 1
Is it expected that these
_test
packages cannot be directly loaded viapackages.Load
?Note that the original call to
Load
of thenested
package does return the associatednested_test
package in the results, but the second call ofLoad
which attempts to directly load thenested_test
package fails.The text was updated successfully, but these errors were encountered: