On Saturday, July 28, 2018 at 11:43:04 AM UTC-7, nafis wrote:
There are some practical considerations to vendoring within a library:
1. If any types from a vendored package appear in the exported interface of your library, no caller will be able to write down the full names of those types because their imports are not from your vendored package path, and so your library may be difficult to use.
2. If the package you are vendoring does anything that relies on the full resolved package path at runtime -- for example, gob encoding uses it by default via reflection when registering types -- then the copy in your vendor directory will see the vendor package path, which may cause problems if the resulting value leaves your program and must be consumed by another program that was expecting the "canonical" path.
I believe if neither of these are true for your library then the decision is entirely internal to your library and callers will not be able to observe any difference compared to a non-vendored copy of the same dependency.