You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add described in golang/go#65917, once Go 1.23 is out we plan to update the gopls go.mod file to say go 1.23.0, meaning that building gopls will require a 1.23 toolchain. Thanks to toolchain upgrades, this will be handled automatically for most users of Go 1.21+.
However, a concern raised on that issue is that some users have GOTOOLCHAIN=local set in their Go environment. Notably, this is set by default in some Linux distributions, such as Fedora.
I believe we are adding knowledge of gopls' build matrix into VS Code. We should also consider the value of go env GOTOOLCHAIN. If local, and the Go version is less than the required build version, we have two options:
Install gopls with an explicit GOTOOLCHAIN=auto.
Don't install gopls, and warn the user that they must install gopls manually or set GOTOOLCHAIN=auto in their VS Code environment.
I think 2 is best. If the user (or distro) has set GOTOOLCHAIN=local, I think we should treat that as a statement that they don't want toolchain upgrades. On the other hand, it seems likely that most users in this scenario are unaware that their distro has this default, and so by failing to upgrade gopls we are causing additional work for them. Nevertheless, (2) seems most conservative, and once users have updated their environment the upgrades will proceed normally in the future.
Another concern is that users may have set GOTOOLCHAIN=local because they don't want go list (implicitly run by gopls) to install toolchains. If we do decide to go with route (1), it should only be for the gopls install, not for the gopls session.
The text was updated successfully, but these errors were encountered:
@hyangah I put this in the v0.42 milestone, but the goal should just be to land this by mid-august, when we plan the gopls@v0.17.0 release. Please re-milestone as appropriate.
Add described in golang/go#65917, once Go 1.23 is out we plan to update the gopls go.mod file to say
go 1.23.0
, meaning that building gopls will require a 1.23 toolchain. Thanks to toolchain upgrades, this will be handled automatically for most users of Go 1.21+.However, a concern raised on that issue is that some users have
GOTOOLCHAIN=local
set in their Go environment. Notably, this is set by default in some Linux distributions, such as Fedora.I believe we are adding knowledge of gopls' build matrix into VS Code. We should also consider the value of
go env GOTOOLCHAIN
. Iflocal
, and the Go version is less than the required build version, we have two options:GOTOOLCHAIN=auto
.GOTOOLCHAIN=auto
in their VS Code environment.I think 2 is best. If the user (or distro) has set
GOTOOLCHAIN=local
, I think we should treat that as a statement that they don't want toolchain upgrades. On the other hand, it seems likely that most users in this scenario are unaware that their distro has this default, and so by failing to upgrade gopls we are causing additional work for them. Nevertheless, (2) seems most conservative, and once users have updated their environment the upgrades will proceed normally in the future.Another concern is that users may have set GOTOOLCHAIN=local because they don't want
go list
(implicitly run by gopls) to install toolchains. If we do decide to go with route (1), it should only be for the gopls install, not for the gopls session.The text was updated successfully, but these errors were encountered: