Description
Using go mod vendor
is great for backwards compatibility (and for self-contained builds), but it requires re-running every time any dependency changes. Multiple times now I have committed changes that I tested with GO11MODULES=on
, only to have them fail in CI where they rely on vendor/
.
The go
tool already updates go.mod
and go.sum
when making builds, I believe it should do the same with the vendor/
folder if it's present, to avoid getting in an inconsistent state.
An out of date vendor/
folder feels like an entirely inconsistent and confusing state to be in, causing builds to unexpectedly fail only for certain users, with no advantages, so the tooling should probably just not let it happen. If a developer doesn't want to keep the vendor/
folder up to date, it should be deleted.