3 ms·
Vendoring might help with building old code. It stores a copy of depencies in a directory which you can include in git. https://go.dev/ref/mod#vendoring https:/
by hu3 3y ago
Vendoring might help with building old code. It stores a copy of depencies in a directory which you can include in git. https://go.dev/ref/mod#vendoring https://go.dev/ref/mod#vendoring
As for upgrading old libraries which might have broken backwards compatibility, I can't offer much.
- bananapub 3y agohow would that help with building old code? is old code often unavailable upstream?
- hu3 3y agoVendoring creates a copy of the dependency files. So no internet connection would be required to build it IF (and that is a big if) the project dependencies were vendored and versioned back then. Interestingly, commiting vendored files is a common point of contention between devs. Some argue that it adds bloat to the project repo. Unless I'm working with TB sized monorepos, I always vendor and commit, because hardware is cheap and my time valuable. I have 10 year old projects that build just fine without internet connection because all deps are commited with the project. As a bonus I get a free diff of every single line that changed when a depency is updated.