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

cmd/go: support @latest-prerelease tag #43141

Open
hyangah opened this issue Dec 11, 2020 · 5 comments
Open

cmd/go: support @latest-prerelease tag #43141

hyangah opened this issue Dec 11, 2020 · 5 comments

Comments

@hyangah
Copy link
Contributor

@hyangah hyangah commented Dec 11, 2020

From #42545 (comment)

Use case
We have a group of VSCode plugin users who opted in to use prerelease versions of tools. For the users, this will be convenient. Currently the plugin has its own logic to retrieve the list, parse versions, and choose the highest tagged version (including prerelease), but it would be better if this can be done with go command.

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 11, 2020

@hyangah
Copy link
Contributor Author

@hyangah hyangah commented Dec 11, 2020

We are definitely in the second group - we want users to test the highest tagged version including prerelease.

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 11, 2020

I don't think I would call it @latest-prerelease, though — that's a bit verbose. Maybe @prerelease?

I also wonder if we should change @v1.x to consider prereleases for v1.x if no release version for that minor is tagged. (Currently we interpret v1.x as ≥v1.x.0, which seems logical but I'm guessing isn't what users actually intend.)

@hyangah
Copy link
Contributor Author

@hyangah hyangah commented Dec 11, 2020

I am fine with any names. I think we need to be careful when choosing a name commonly used for branch.

No opinion on v1.x - to me that form looks like a shortcut of v1.x.0 (like the Go project itself) and should be considered a stable release.

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 24, 2021

Change https://golang.org/cl/295418 mentions this issue: src/goInstallTools: use go list to check upgradability

gopherbot pushed a commit to golang/vscode-go that referenced this issue Mar 11, 2021
The extension has been querying the module proxy's /@v/list
endpoint directly to get the list of available gopls version.
This change changes the logic to use `go list -m` to get the
version list. With go1.16, version retraction feature
was added, and using the go command is more reliable way to
learn about the retracted versions. So, use that.

This change also fixes a bug in the tool installation that
prevented Go nightly users from installing gopls prerelease
versions when using 'Go: Update/Install Tools' command.
If the go command supports `@latest-prerelease` tag, it would
have been easier. But that's not available, so we run `go list
-m --versions` and find the last version from Versions.

Updates golang/go#43141

Change-Id: I67fe368cbce734e3b39e5352b3b3f6f08918562c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/295418
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants