sdboyer / gps

your dependencies have arrived
MIT License
270 stars 24 forks source link

Symlinked nested vendor dirs don't get stripped when writing the dep tree #198

Closed spenczar closed 7 years ago

spenczar commented 7 years ago

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.

sdboyer commented 7 years ago

symlinks haunt my nightmares