A single go.mod change broke imports for an entire Go development team
A five-person student team building a forum app in Go encountered a project-wide build failure after a teammate accidentally replaced the correct module name in go.mod with a generic one during a branch merge. Because Go derives every internal import path from the module name declared in go.mod, the change silently invalidated all imports written against the original name. The error message — stating the package was "not in std" — was misleading, as Go was searching its standard library for a package it no longer recognized as local code. The fix required restoring the correct module name and manually updating import paths in all files written during the window when go.mod was incorrect. The incident highlighted that go.mod should be treated as a critical, team-owned configuration file that no developer should regenerate locally without first verifying the existing contents.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in