Go major versions: v2 paths and semantic import versioning
11 steps · about 3 h 32 min · Intermediate
- Module version numbering (doc, go.dev, 10 min)
Start with what v0, v1, pre-release and major numbers signal before learning the path rules.
- Publishing Go Modules (article, The Go Blog, 15 min)
It shows tagging v0 and v1 releases and the rule never to rewrite a published version.
- Go += Package Versioning (Go & Versioning, Part 1) (article, research!rsc (Russ Cox), 25 min)
The import compatibility rule is the idea behind /v2 paths, and this is where its author states it.
- Semantic Import Versioning (Go & Versioning, Part 3) (article, research!rsc (Russ Cox), 30 min)
A dependency story shows why hiding major versions causes diamond-dependency breakage.
- Go Modules Reference (reference, go.dev, 25 min)
Read the official 'Major version suffixes' section to pin down the exact rules, including +incompatible.
- Go Modules: v2 and Beyond (article, The Go Blog, 20 min)
A worked example of releasing v2 using the major-subdirectory strategy and pre-release tags.
- Migrating to Go Modules (article, The Go Blog, 15 min)
It covers projects already tagged v2+ before modules and how to avoid breaking their users.
- Go Wiki: Go Modules (reference, go.dev, 20 min)
The FAQ answers edge cases, such as how v2+ modules behave for non-module users.
- Managing module source (doc, go.dev, 12 min)
Learn how repository layout and several go.mod files map onto module paths and versions.
- Publishing a module (doc, go.dev, 10 min)
Finish with the practical steps: tidy, test, tag, push and prompt the proxy index.
- The Principles of Versioning in Go (Go & Versioning, Part 11) (article, research!rsc (Russ Cox), 30 min)
A closing look at why Go chose semantic import versioning and minimal version selection.