Skip to content
oss-kit
GitHubInstall

Where an ecosystem encodes the major version in package identity, the released major matches it

Rule
R-CHG-07
Forge scope
GitHub and GitLab

A version that disagrees with the package name is not a documentation defect, because the two resolve to different packages. Go states the requirement outright: a module released at v2 or higher must carry a matching suffix on its module path and therefore on the import path of every package inside it, so a repository tagged v2.0.0 whose go.mod still names the v1 path has published a v1 that no consumer of v2 can import. R-CHG-03 asks the tag, the manifests, and the changelog to agree on one version, and it does not reach the package name.

Observable check

where the ecosystem encodes the major version in package identity, that identity matches the released major. For a Go module at v2 or higher, the module line in go.mod ends in the matching /vN suffix and the newest release tag's major matches it; a gopkg.in path carries the suffix at every major, including v0 and v1, and separates it with a dot rather than a slash. An ecosystem that does not encode the major version in package identity falls outside this rule rather than satisfying it with nothing to check.

Where this comes from

Last read against these sources on 2026-07-31.

Go is the only ecosystem on the current roster that encodes the major version in package identity, and it states the requirement rather than leaving it to convention: 'If the module is released at major version 2 or higher, the module path must end with a major version suffix like /v2', with the matching prohibition that 'Major version suffixes are not allowed at major versions v0 or v1', and the gopkg.in exception carrying the suffix at every major with a dot rather than a slash. The rule is worded for the general case rather than for Go alone because the failure is structural: the suffix reaches the import path of every package in the module, so the mismatch is not a stale number but a package nobody can import. Everything else on the roster falls outside the rule by its own Check, which is why this is a one-ecosystem rule that is worth having at all. Retire it if Go drops the suffix requirement, and widen it if another roster ecosystem adopts one.

Read the whole standard