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

Comments

Projects
None yet
3 participants
@ahmetb
Copy link

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 this to the Go1.11 milestone May 27, 2018

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 27, 2018

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

This comment has been minimized.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.