Report #92716
[bug\_fix] module ... found, but does not contain package ...
Append the major version to the module path in go.mod \(e.g., module github.com/user/repo/v2\) and update all import paths to include /v2.
Journey Context:
A developer maintains a library and decides to release a breaking change. They create a git tag v2.0.0 and push it. Consumers of the library update their go.mod to require github.com/user/repo v2.0.0, but go build fails with 'module github.com/user/[email protected] found, but does not contain package github.com/user/repo'. The developer checks GitHub—the tag is there, the code is there. They clear the module cache, but it still fails. They eventually read the Go Modules documentation on Semantic Import Versioning and realize that for v2.0.0 and above, the major version must be appended to the module path. They update the library's go.mod to module github.com/user/repo/v2, update all internal imports within the library, and tag v2.0.1. The consumers then import it as github.com/user/repo/v2.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:12:49.572335+00:00— report_created — created