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

Show a pop-up to help returning users upgrade their environments #3418

Closed
stamblerre opened this issue Jun 2, 2024 · 4 comments
Closed

Show a pop-up to help returning users upgrade their environments #3418

stamblerre opened this issue Jun 2, 2024 · 4 comments

Comments

@stamblerre
Copy link
Contributor

Hi Tools team 😄 ❤️

I was just trying to use Go for a personal project, and I had a very old version of Go and of gopls installed on my computer. The version of Go was actually so old that it wouldn't build gopls, and I kept getting this error message:

go install -v golang.org/x/tools/gopls@latest
package golang.org/x/tools/gopls
	imports golang.org/x/tools/gopls/internal/cmd
	imports golang.org/x/tools/gopls/internal/vulncheck/scan: build constraints exclude all Go files in /Users/rstambler/code/pkg/mod/golang.org/x/tools/[email protected]/internal/vulncheck/scan
package golang.org/x/tools/gopls
	imports golang.org/x/tools/gopls/internal/cmd
	imports golang.org/x/tools/gopls/internal/cache
	imports golang.org/x/tools/gopls/internal/vulncheck/semver: build constraints exclude all Go files in /Users/rstambler/code/pkg/mod/golang.org/x/tools/[email protected]/internal/vulncheck/semver

At this point, I imagine there are many people out there who have installed some old version of Go, and they might be frustrated if they try Go again some years later. I wonder if there isn't a way for VS Code to come up with an alert that say something like "Welcome back! Your version of Go is no longer supported. Click here to update to the latest version and rebuild all of your Go tools." or something like that.

Hope this isn't a duplicate issue & excited to play with the latest version of all these great tools! 😄

@gopherbot gopherbot added this to the Untriaged milestone Jun 2, 2024
@adonovan
Copy link
Member

adonovan commented Jun 3, 2024

Welcome back from the wilderness, Rebecca!

@findleyr
Copy link
Contributor

findleyr commented Jun 6, 2024

Another option here would be to have a main_outdated.go file that produces a more useful error, such as undefined: THIS_GO_VERSION_IS_UNSUPPORTED.

However, forward compatibility means that this is only an issue for users of Go versions older than 1.21 (Rebecca: starting in a few weeks we're going to be able to require the latest version of Go to build gopls!

So the particular problem of upgrading gopls will become less and less severe over time. @hyangah doesn't the extension already prompt users to upgrade Go? I wonder if it is sufficient to improve that popup?

@findleyr
Copy link
Contributor

findleyr commented Jun 6, 2024

We discussed in our triage meeting (started by you!) and decided this is not worth doing, thanks to the forward compatibility mentioned above (requested by you!).

@hyangah
Copy link
Contributor

hyangah commented Jun 7, 2024

@hyangah doesn't the extension already prompt users to upgrade Go? I wonder if it is sufficient to improve that popup?

It sounds like since there was an old gopls that was compatible with the old go, there was no problem the extension should report. But when trying to upgrade or reinstall gopls, the old go version wasn't compatible with the latest gopls. The latest version of extension still allowed go1.18 for tools installation (this bug was fixed in the master, but we didn't release the extension with the fix)

I agree that once the extension stops allowing go1.20 or older (#3411), this isn't worth doing.

@hyangah hyangah closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants