We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
go version devel +e7bce08493 Wed Aug 8 16:54:21 2018 +0000 darwin/amd64
yes
go env
go list -json -test -- a b
a/a.go: package a; import _ "b" b/b.go: package b b/b_test.go: package b b/bx_test.go: package b_test; import _ "a"
package a; import _ "b"
package b
package b_test; import _ "a"
I expected the Imports of package a to be "b" not the test variant "b [b.test]
{ "Dir": "/Users/suzmue/go/src/a", "ImportPath": "a", "Name": "a", "Target": "/Users/suzmue/go/pkg/darwin_amd64/a.a", "Root": "/Users/suzmue/go", "Stale": true, "StaleReason": "stale dependency: b", "GoFiles": [ "a.go" ], "Imports": [ "b" ], "Deps": [ "b" ] } { "Dir": "/Users/suzmue/go/src/b", "ImportPath": "b [b.test]", "Name": "b", "Root": "/Users/suzmue/go", "ForTest": "b", "Stale": true, "StaleReason": "build ID mismatch", "GoFiles": [ "b.go", "b_test.go" ], "TestGoFiles": [ "b_test.go" ], "XTestGoFiles": [ "bx_test.go" ], "XTestImports": [ "a", "b" ] } ...
{ "Dir": "/Users/suzmue/go/src/a", "ImportPath": "a", "Name": "a", "Target": "/Users/suzmue/go/pkg/darwin_amd64/a.a", "Root": "/Users/suzmue/go", "Stale": true, "StaleReason": "stale dependency: b", "GoFiles": [ "a.go" ], "Imports": [ "b [b.test]" ], "ImportMap": { "b": "b [b.test]" }, "Deps": [ "b" ] } { "Dir": "/Users/suzmue/go/src/b", "ImportPath": "b [b.test]", "Name": "b", "Root": "/Users/suzmue/go", "ForTest": "b", "Stale": true, "StaleReason": "build ID mismatch", "GoFiles": [ "b.go", "b_test.go" ], "TestGoFiles": [ "b_test.go" ], "XTestGoFiles": [ "bx_test.go" ], "XTestImports": [ "a", "b" ] } ...
cc @bcmills
The text was updated successfully, but these errors were encountered:
I believe this is the underlying cause of #26847
Sorry, something went wrong.
CC: @rsc
Change https://golang.org/cl/128836 mentions this issue: cmd/go: list -test reports the correct import path
cmd/go: list -test reports the correct import path
d611e95
No branches or pull requests
What version of Go are you using (
go version
)?go version devel +e7bce08493 Wed Aug 8 16:54:21 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
a/a.go:
package a; import _ "b"
b/b.go:
package b
b/b_test.go:
package b
b/bx_test.go:
package b_test; import _ "a"
What did you expect to see?
I expected the Imports of package a to be "b" not the test variant "b [b.test]
What did you see instead?
cc @bcmills
The text was updated successfully, but these errors were encountered: