by jacques_chester · 5y ago · 0 comments
If your git repositories aren't tagged just so, then go mod throws its hands up and simply invents a whacky snapshot version. Because it can't itself properly determine "earlier version" from "later version" on that snapshot, you often wind up with multiple snapshots from the same repo, not infrequently transmitted through other dependencies.
This is just jolly good fun when it turns out that your dependencies are pulling in incompatible versions of things. Since the official Kubernetes policy for downstream consumers is "we don't care about downstream consumers", it happens more quickly than one would expect.
As much as I have hated playing whack-a-mole with Maven or Bundler, I hate even more playing whack-an-adamantium-and-invisible-with-xray-eyes-mole against go mod.
Either I’m misunderstanding you or you’re mistaken. You can’t have multiple versions of the same module in a go build.
If you never tag v1, you'll never have to deal with it.
Does that mean Kubernetes is not following the version tagging policy in its repos? That seems...surprising!
It would mean that you need to create Go compatible tags for your library releases OR adjust your product versions to match Go's assumptions.
The whole implementation of Go modules is a shit show once you get into the weeds.