Remove 4.x go.mod to make semantic versions addressable by tag #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in #98, the presence of a go.mod file in the root of the module in tagged semantic versions >= v2.x means go module consumers cannot address v4.x releases using semantic versions
For example, the recently tagged v4.8.0 has to be referred to as
v0.0.0-20200808040245-162e5629780b
, directly referencing the git SHA.#100 resolved this for v5+, but removing the go.mod in the module root would allow v4.x consumers to resume referencing semantic version.
If this was merged and a v4.9.0 release tagged, consumers could do
go get github.com/evanphx/[email protected]
and record the tagged release in their go.mod files correctly.This is more of a tidyness issue than a functional one (it makes the versions recorded in consumers' go.mod files easier to understand, but doesn't actually change the code that is run), though if consumers have to refer to v4.8.0 as
v0.0.0-20200808040245-162e5629780b
, go module version selection can get confused and preferv4.6.0-incompatible
thinking it is newer.