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

cmd/go: 'go list' fails to populate Module field for test packages #39974

Closed
bcmills opened this issue Jul 1, 2020 · 1 comment
Closed

cmd/go: 'go list' fails to populate Module field for test packages #39974

bcmills opened this issue Jul 1, 2020 · 1 comment
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jul 1, 2020

example.com$ go version
go version devel +84152d57 Wed Jul 1 09:07:18 2020 +0000 linux/amd64

example.com$ go list -test -f '{{.ImportPath}} {{.Module}} {{.ForTest}}' .
example.com example.com
example.com.test <nil>
example.com [example.com.test] example.com example.com

-- a.go --
package a
-- a_test.go --
package a

import "testing"
-- go.mod --
module example.com

go 1.15

Note the <nil> entry in the Module field for the synthesized example.com.test package.

CC @jayconrod @matloob

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. modules labels Jul 1, 2020
@bcmills bcmills added this to the Go1.16 milestone Jul 1, 2020
@bcmills bcmills self-assigned this Jul 1, 2020
@gopherbot
Copy link

Change https://golang.org/cl/240678 mentions this issue: cmd/go: populate the Module field for test packages

@golang golang locked and limited conversation to collaborators Aug 24, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants