-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: mod vendor introspection #40022
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
Comments
go mod vendor
introspection
@leventov Could you be more specific? What's an example of a package you expected to be vendored? What message should have been printed?
|
Some packages are not vendored (despite being imported) because "build constraints exclude all Go files". So it would be helpful to print exactly that, ideally with the list of constraints imposed by the Go files in the package that are not satisfied. |
If you find that's not the case, it may be a bug, so please give a reproducible example. |
In my case the reason (apparently) why a package was not included was because |
@leventov The |
I'm not interested in that specific problem, because it is already solved for me. I opened this issue as a meta issue: there should be a way to debug problems like that, whether due to bugs in golang tooling or legitimate behaviour. I was relatively lucky to notice a faulty directive quickly, but I didn't have any means at all to inspect the problem. |
I'm closing this, since I don't think there's anything we can reasonably do here. Printing packages that aren't vendored means building a list of packages that weren't imported. Building that list would mean fetching modules we wouldn't normally fetch, possibly encountering new errors. The message we would print next to each package would be something like "not imported directly or indirectly by packages in the main module", which doesn't seem useful. As I've said, the set of packages that are vendored should not depend on the |
It would be nice if
go mod vendor -v
not only printed vendored packages, but also packages omitted, and the reasons why they are omitted (see #29074).What version of Go are you using (
go version
)?Go 1.14
The text was updated successfully, but these errors were encountered: