v0.42.0 - 17 Jul, 2024
A comprehensive list of changes can be found in the complete commit history.
Updates in gopls
- Gopls v0.16: The latest gopls version as of this release is gopls v0.16. The extension settings documentation has been updated to align with the latest gopls settings.
- The gopls project provides an index of all supported features. We are working on making this documentation more accessible from the extension. Please stay tuned for updates.
Updates in telemetry
This extension continues to use Go toolchain telemetry.
By default, telemetry data is kept only on the local computer, but you can opt in to share it with the Go team with one of the following ways:
go run golang.org/x/telemetry/cmd/gotelemetry@latest on
in the terminal, orgo telemetry on
, from go1.23, or- Respond to the prompt when it appears.
Once uploading is enabled, the data will be sent to https://telemetry.go.dev approximately once a week.
Changes
Tools installation
-
For tools installation managed by the extension, this version requires go1.19 or newer version. The next minor release (v0.43.0+) will require go1.21 or newer to install tools. If your project requires go1.20 or older to build, you will need to manually install compatible versions of tools, or configure the
"go.toolsManagement.go"
setting to use go1.21+ when installing the tools. -
The extension installs its required tools using the
go install
command. Starting go1.21, thego
command allows tool authors to specify the minimum Go version required to build their tools. If the required go toolchain version is not locally available, thego
command needs to download it like other dependencies of the tool. To ensure this toolchain switch works correctly, the extension enforcesGOTOOLCHAIN=auto
mode during tools installation. Note that this change does not affect how it builds and tests your own project. For more information about Go's toolchain switch behavior, see the official documentation.
Debugging
- The default launch.json template for "Go: Launch Package" was updated to use
"${workspaceFolder}${1:}"
instead of"${fileDirname}"
as the default"program"
attribute value. If the package to debug is located in the subdirectory, adjust the configuration to point to the main package path. The official VS Code Variables Reference lists useful substitution rules you can use in adjusting your launch.json setting.
Thanks
Thanks for your contributions, @yimiaoxiehou!