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: list of .Deps shows a mix golang.org and golang_org items #25592

Closed
ahmetb opened this issue May 26, 2018 · 2 comments
Closed

cmd/go: list of .Deps shows a mix golang.org and golang_org items #25592

ahmetb opened this issue May 26, 2018 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ahmetb
Copy link

ahmetb commented May 26, 2018

What version of Go are you using (go version)?

go 1.10.2

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

darwin amd64

What did you do?

I'm running this command to find dependencies of my program that are located in vendor/:

go list -f '{{join .Deps "\n"}}' ./... | grep -Eo 'vendor/.*' | sort | uniq

(Output of this command is listed below.)

In this list, there's a mix of both vendor/golang_org/... (note the underscore), and vendor/golang.org/.... But in reality, there's only vendor/golang.org/... on my filesystem.

vendor/golang.org/x/text/language
vendor/golang.org/x/text/runes
vendor/golang.org/x/text/secure/bidirule
vendor/golang.org/x/text/transform
vendor/golang.org/x/text/unicode/bidi
vendor/golang.org/x/text/unicode/norm
vendor/golang.org/x/time/rate
vendor/golang_org/x/crypto/chacha20poly1305
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
vendor/golang_org/x/crypto/cryptobyte
vendor/golang_org/x/crypto/cryptobyte/asn1
vendor/golang_org/x/crypto/curve25519
vendor/golang_org/x/crypto/poly1305
vendor/golang_org/x/net/http2/hpack
vendor/golang_org/x/net/idna
vendor/golang_org/x/net/lex/httplex
vendor/golang_org/x/net/proxy
vendor/golang_org/x/net/route
vendor/golang_org/x/text/secure/bidirule
vendor/golang_org/x/text/transform
vendor/golang_org/x/text/unicode/bidi
vendor/golang_org/x/text/unicode/norm

Looks like some special treatment of string golang_org/x/ in the Go source tree:

I can't tell why it is taking effect but it is confusing, and probably should not happen.

What did you expect to see?

  • vendor/golang_org/... items in the {{.Deps}} should be listed as vendor/golang.org/... which is how they appear in the filesystem.

What did you see instead?

  • Dependencies listed as vendor/golang_org/... instead ofvendor/golang.org/... for some reason I cannot figure out.
@agnivade agnivade changed the title cmd/go: list shows .Deps items for golang.org as golang_org (with underscore) cmd/go: list of .Deps shows a mix golang.org and golang_org items May 27, 2018
@agnivade agnivade added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 27, 2018
@agnivade agnivade added this to the Go1.11 milestone May 27, 2018
@ianlancetaylor
Copy link
Contributor

The references to vendor/golang_org are coming from the standard library, where the name golang_org is used because of #16333. Since you are asking for .Deps of all packages, which includes the standard library, I think this is correct behavior and that there is no bug here.

The reference to golang_org in cmd/api is irrelevant here. That code is not being run by cmd/go.

@ahmetb
Copy link
Author

ahmetb commented May 28, 2018

That makes sense, we can close this. Feel free to keep it open if you'd like to use this for tracking.

@golang golang locked and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants