3 ms·
A separate but more important issue is that you still have two copies of any global state managed by/contained within that library in memory. That is basically
by yoklov 11y ago
A separate but more important issue is that you still have two copies of any global state managed by/contained within that library in memory.
That is basically guaranteed to lead to bugs.
- nulltype 11y agoOne that definitely happens is if, for instance, a library returns datastore.ErrNoSuchEntity, but vendored the "datastore" package. If you have your own version of "datastore" then you do "err == datastore.ErrNoSuchEntity" and it's false, because there are two copies of ErrNoSuchEntity in memory. This seems pretty solvable though. If you vendor a package, you need to make sure you don't do this. If we do gb-style everyone vendors stuff themselves (not in libraries), then it's not an issue.