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

x/mod/module: move pseudo-version functions from cmd/go/internal/modfetch #44969

Closed
jayconrod opened this issue Mar 12, 2021 · 3 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@jayconrod
Copy link
Contributor

These functions in modfetch are used to handle pseudo-versions in the Go command. They're not tied to anything else in the go command and could be moved out into x/mod/module without much trouble.

func IsPseudoVersion(v string) bool
func IsZeroPseudoVersion(v string) bool
func PseudoVersion(major, older string, t time.Time, rev string) string
func PseudoVersionBase(v string) (string, error)
func PseudoVersionRev(v string) (rev string, err error)
func PseudoVersionTime(v string) (time.Time, error)
func ZeroPseudoVersion(major string) string

We could move SortVersions, too, while we're at it.

@jayconrod jayconrod added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 12, 2021
@jayconrod jayconrod added this to the Go1.17 milestone Mar 12, 2021
@gopherbot
Copy link

Change https://golang.org/cl/304150 mentions this issue: module: move pseudo-version functions into module

@gopherbot
Copy link

Change https://golang.org/cl/304229 mentions this issue: cmd/go: move pseudo-version code from modfetch to x/mod/module

@gopherbot
Copy link

Change https://golang.org/cl/304151 mentions this issue: semver: add ByVersion and Sort for sorting semantic version lists

gopherbot pushed a commit to golang/mod that referenced this issue Mar 23, 2021
For golang/go#44969

Change-Id: Ie094d59140764b7f1cffb879d99a13da23a977da
Reviewed-on: https://go-review.googlesource.com/c/mod/+/304150
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
gopherbot pushed a commit to golang/mod that referenced this issue Mar 23, 2021
For golang/go#44969

Change-Id: I148a18b676061cd8ea481c3f5130d0792c0b5233
Reviewed-on: https://go-review.googlesource.com/c/mod/+/304151
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@golang golang locked and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants