Many projects I work on use a symlink for the vendor directory (./vendor -> ./_vendor, typically) because this fools the Go tool into not diving into vendored packages when running stuff like go test ./... - this is one of the solutions out there for https://github.com/golang/go/issues/19090.
gps's WriteDepTree cleans out dependencies' vendor directories, but only does so for ./vendor paths which are proper directories, not symlinks to directories. This breaks dep usage for these projects, since the packages in the nested vendor path are treated as distinct packages with their own separate types by the Go compiler.
Many projects I work on use a symlink for the vendor directory (
./vendor -> ./_vendor
, typically) because this fools the Go tool into not diving into vendored packages when running stuff likego test ./...
- this is one of the solutions out there for https://github.com/golang/go/issues/19090.gps's
WriteDepTree
cleans out dependencies' vendor directories, but only does so for./vendor
paths which are proper directories, not symlinks to directories. This breaksdep
usage for these projects, since the packages in the nested vendor path are treated as distinct packages with their own separate types by the Go compiler.