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

go/build: deps_test.go should check transitive dependencies? #10475

Closed
mdempsky opened this issue Apr 16, 2015 · 4 comments
Closed

go/build: deps_test.go should check transitive dependencies? #10475

mdempsky opened this issue Apr 16, 2015 · 4 comments
Milestone

Comments

@mdempsky
Copy link
Member

If I add

import _ "net/smtp"

to net/http/client.go, then deps_test.go fails.

If I add the same line to net/http/internal (which is imported by net/http/transport.go), then deps_test.go doesn't complain. It seems like deps_test.go should still catch this somehow.

Possible ideas: check a package's transitive dependencies rather than just its immediate dependencies, or check that all of its immediate dependencies are also listed in pkgDeps.

@minux
Copy link
Member

minux commented Apr 16, 2015 via email

@mdempsky
Copy link
Member Author

That would be my second suggestion ("check that all of its immediate dependencies are also listed in pkgDeps"), but my point is that deps_test.go should have caught this. It's also missing at least image/internal/imageutil, mime/quotedprintable, internal/singleflight, internal/mime, container/list, internal/syscall/unix, and internal/syscall/windows, so it's blind to transitive dependencies added via those packages too.

@minux
Copy link
Member

minux commented Apr 16, 2015 via email

@bradfitz bradfitz added this to the Go1.5 milestone Apr 16, 2015
@bradfitz
Copy link
Contributor

Yes, any package not listed in the map should be treated as having no allowed dependencies.

Good find.

@mdempsky mdempsky self-assigned this Apr 16, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants