Comcast / gots

MPEG Transport Stream handling in Go
Other
308 stars 88 forks source link

Proposal: Please start using Semantic Versioning #141

Closed KateGo520 closed 3 years ago

KateGo520 commented 4 years ago

I found that this project already supports Go modules. But sadly, the tags doesn't follow Semantic Versioning, which means that all tags of this project will be ignored by Go modules and replaced by pseudo-versions, go get acts weirdly when tags are not in that form. It would be great to have the tagged release be named in the format vX.X.X format so that go mod can read it.

    github.com/Comcast/gots v0.0.0-20200213175321-9799558ed3e2

Else the mod file shows something like github.com/Comcast/gots v0.0.0-20200213175321-9799558ed3e2 which is not very readable and difficult to upgrade. It’s hard to verify which version is in use. This is not conducive to version control.

So, I propose this project to follow Semantic Versioning in future versions. For example, v1.0.1, v2.0.0, v3.1.0-alpha, v3.1.0-beta.2etc.

KateGo520 commented 4 years ago

@jheitz200 Could you help me review this issue? Thx :p

LimitlessEarth commented 4 years ago

I just cut v2.1.4 from master, which will hopefully make things work-able until we get this resolved in the long run. It appears the untagged releases are coming from Travis when a PR is merged. I will look into fixing that.

KateGo520 commented 4 years ago

@LimitlessEarth I see the new tag v2.1.4 . But the module path is inconsistent with the version now. Because github.com/Comcast/gots has already used the module, and the version number is v2 +, so the module path should be github.com/Comcast/gots/v2 now. Or the module users will get the errors :

$go get github.com/Comcast/gots@v2.1.4
go get github.com/Comcast/gots@v2.1.4: github.com/Comcast/gots@v2.1.4: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
docwhat commented 3 years ago

I think the main fix is to release a new v2.x.x with a go.mod that has the first line:

module github.com/Comcast/gots/v2

For major version v0 and v1 you don't need that trailing vnumber. But for major version v2 and up you do.

So when you release v3, it should read:

module github.com/Comcast/gots/v3
LimitlessEarth commented 3 years ago

Hey there, I wanted to let you know that I am have seen your PR and comment. My main work is picking up like crazy and it might take me a bit to get back on this. I am honestly laking in Go Mod knowledge and I mention this because it might take me a minute to go learn. Thank you for looking into this though!

LimitlessEarth commented 3 years ago

Should be resolved. Thank you for your patience!

docwhat commented 3 years ago

We just need a tagged v2.x.x release with #162 in it and it should work; IIUC