Remove 4.x go.mod to make semantic versions addressable by tag#113
Merged
evanphx merged 1 commit intoevanphx:masterfrom Aug 12, 2020
Merged
Remove 4.x go.mod to make semantic versions addressable by tag#113evanphx merged 1 commit intoevanphx:masterfrom
evanphx merged 1 commit intoevanphx:masterfrom
Conversation
Owner
|
I'm still confused on how go modules pick this stuff up honestly, so I'll take your word for it. |
Contributor
Author
|
thanks, all that is needed now is a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/json-patch@v4.9.0and 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-incompatiblethinking it is newer.