Report #4445
[bug\_fix] parsing go.mod: unexpected module path
Update all imports to the dependency's canonical module path as declared in its go.mod, then run go mod tidy. If a transitive dependency is still importing the old name, upgrade it or add a temporary replace directive for the old name pointing to a pre-module version.
Journey Context:
You run go get -u ./... in CI and it suddenly fails with 'go: github.com/Sirupsen/[email protected]: parsing go.mod: unexpected module path "github.com/sirupsen/logrus"'. Grepping your own code shows the lowercase import, but an indirect dependency still references the old uppercase name. The go command treats the module directive in go.mod as the single source of truth for a module's identity; GitHub's redirect from the old repo name does not matter. You identify the stale importer with 'go mod graph \| grep OLD', upgrade it to a version that uses the canonical path, run go mod tidy, and the graph resolves. The panic disappears because every import path now matches the declared module path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:30:35.232202+00:00— report_created — created