Skip to content
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

proposal: cmd/go: go.mod directive allowing semver without v prefix #57923

Closed
prochac opened this issue Jan 19, 2023 · 2 comments
Closed

proposal: cmd/go: go.mod directive allowing semver without v prefix #57923

prochac opened this issue Jan 19, 2023 · 2 comments

Comments

@prochac
Copy link

prochac commented Jan 19, 2023

Hitting the Go module semver problem, where Go requires one and only v prefixed versions, I went through this issue and I really think that it should get some happy ending.

Some valid points, why versioning without v should be supported
#32945 (comment)
#32945 (comment)

Seems like the only reason for declining support for v-less semver tags is their collision.
#32945 (comment)
#30146 (comment)

What if the go.mod file would contain a directive that clearly declares which semver format is valid for this project?

@gopherbot gopherbot added this to the Proposal milestone Jan 19, 2023
@seankhliao
Copy link
Member

what happens when you have a vX.Y.Z without the directive and a different X.Y.Z tag with the directive

Duplicate of #32945

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2023
@prochac
Copy link
Author

prochac commented Jan 19, 2023

what happens when you have a vX.Y.Z without the directive and a different X.Y.Z tag with the directive

Duplicate of #32945

For sure, the vX.Y.Z would be the default, because of the backward compatibility.

// go.mod
module module play.ground

go 1.19

versioning google // vX.Y.Z (default)
versioning semver // X.Y.Z

@golang golang locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants