New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the release tags version go mod compatible. #384
Comments
is hard to verify which version is in use |
any plans to adopt |
@xmlking Wouldn't this just require a creating a new GitHub release using the correct semver format? Or are you thinking about adding the major version to the module path? Because this repo hasn't used semver before it's a bit unclear to me what the first semver should be. If existing versions have been backwards compatible then maybe they should be seen as minor versions, e.g. v11 would correspond to v0.11.0, and in that case the first semver compatible version could be v0.12.0 and the module path could stay as it is. On the other hand if v11 should be seen as corresponding to v11.0.0 then |
Right, all we have to do is create a git tag and push to default branch. I think v11.0.0 could be our first tag |
Unless we have breaking change in next release, we don’t have to tag next version as v12.0.0. |
What I am referring to is this. For a repo that has been following SemVer before and is on v2+ but is not using Go Modules the recommendation for when adopting it is clear as per this. The gist of it is that the module already being on v2+ implies that there have been breaking changes in the past which is not allowed according to the import compatibility rule so then the import path should be appended with the major version. However, because this repo has not been following SemVer before it is not as obvious if each new release should be seen as a new major version or not. I don't know if there has ever been any breaking changes between releases but even if there hasn't it might be less confusing to start at v11.1.0 or v12.0.0. If we do that then I do believe that to follow best practices the import path should be suffixed with the major version, which in turn would point to v12 this change in itself is breaking. We could of course say that this is all a bit unnecessarily strict and just create a v11.0.0 release from exactly the same commit as v11, or maybe a v11.0.1/v11.1.0 release from HEAD (not sure how significant the latest commits are) and be done with it. |
The last option seems far too easy to not implement. Just tag |
@asaskevich How would you feel about just tagging the current release And then from now on releasing v11.x.y until there are breaking changes? |
@yhrn @xmlking @migueleliasweb @deepanshutr that sounds good. I've created v11.0.0 tags so you can check if everything is fine |
It seems it is not fine as I always have to import like this:
Maybe you have to respect the SIV If I force
|
Yeah, it seems like the module path needs to be changed to Another option that might work is to treat the old, non-semver releases (v1, ..., v11) as minor versions and tag the latest version with |
The missing
Any way to add this? |
@asaskevich we had a similar issue in our project which needed to be resolved by including the major version in the import path per @yhrn's commentary above. Effectively once the major version is in the import path you can release As previously mentioned too if the major version gets bumped you should also be incrementing that in your import path to be in line with semver releases for the Would you be happy to accept a PR which fixes this issue? |
Hello guys! |
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. Else the mod file shows something like github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 which is not very readable and difficult to upgrade.
The text was updated successfully, but these errors were encountered: