Description
As soon as 1.23-rc1 is released, we want to update the toolchain requirement for x/tools/gopls to 1.23-rc1, in accordance with the plan in #65917. This means gopls will require at least a 1.23 toolchain to build.
However, we still want to support gopls integrating with the go command of older go versions. This would happen naturally on the release branch trybots, except that due to GOTOOLCHAIN=local
they cannot build gopls. https://go.dev/cl/588766 contains a trial CL demonstrating this failure mode.
I propose that we remove the GOTOOLCHAIN=local
setting for gopls tests. Given that the gopls build must already download external dependencies, I don't see why GOTOOLCHAIN=local is necessary.
A side effect may be that some gopls tests download additional toolchains. That may or may not be desirable, depending on whether the test itself is intended to exercise toolchain upgrades. Currently, we have some tests that we'd like to write but can't, because of the GOTOOLCHAIN=local
restriction. For tests where the toolchain upgrade is unintended, we can guard the test using existing mechanisms to skip on older toolchains.
This issue is somewhat urgent, since we want to make this change in the gopls go.mod file as soon as the Go rc is cut in mid June. Putting this in the 1.23 milestone to reflect the relationship of this issue with the 1.23 release.