object88 / langd

A Language Server Protocol implementation in Go for Go
MIT License
7 stars 0 forks source link

Vendored projects may not have all required packages #13

Open object88 opened 6 years ago

object88 commented 6 years ago

A repo that has been vendored in will only have the packages it depends on for the imported packages. In other works, if repo A is vendored in and it has packages X and Y, but only X is referenced, then Y’s dependencies will not be vendored in. This keeps a much smaller vendor directory, but it meams that we cannot simply read in the whole vendor directory.

This is largely unimportant, unless the user wants to track ALL references to an ident, for example. X may expose something that is consumed by Y, but we wouldn’t know it because we aren’t able to load Y for its missing imports.

Need to find a resolution: 1) This is acceptable. 2) Import everything in vendor, and go get missing parts. 3) go get entire recursive chain. 4) load nothing extra and accept some partial or incomplete packages.

object88 commented 6 years ago

_test.go files in vendor directories are now excluded, but there may be a better way to handle this. Should explore further.