Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: not versioning non-go-source resources #26244
Please answer these questions before submitting your issue. Thanks!
What did you do?
vgo get github.com/antlr/grammars-v4
What did you expect to see?
a vendor directory containing the grammars
What did you see instead?
no vendor dir (no other dependencies yet)
Does this issue reproduce with the latest release (go1.10.3)?
vgo vendor (now vgo mod -vendor or go mod -vendor) does not copy entire repositories. By design, it copies only the directories needed to satisfy imports in builds of the top-level module. If your module is not importing github.com/antlr/grammars-v4 then that directory will not be copied. And if there are directories with only non-Go files, there is no way to copy those directories into vendor. That's not what vendor is for. Vendor is only about preserving the code needed to build the main module.