Skip to content

Release 0.40.0

Compare
Choose a tag to compare
@github-actions github-actions released this 16 Nov 18:37

v0.40.0 - 16 Nov, 2023

This extension uses Go Telemetry to gather insights about the performance and stability of the extension and the language server it employs.

By default, Telemetry uploading is disabled, but starting from this version, a small number of users will be prompted to enable it.
Users can uploading of telemetry data by either responding to the prompt or running the following command:

go run golang.org/x/telemetry/cmd/gotelemetry@latest on

Once uploading is enabled, the data will be sent to https://telemetry.go.dev each week.

You can find more information about this process at https://telemetry.go.dev/privacy and in the gopls v0.14 release notes.

A comprehensive list of changes can be found in the complete commit history.

Changes

  • In this release, we have removed legacy language feature providers that were supported by outdated tools. As a result, features such as code completion, navigation, documentation, diagnostics, and refactoring will only function when the language server (gopls) is enabled. (Issue 2799)

  • The "Go: Fill struct" command has been retired. The same functionality is provided by gopls as a Code Action for refactoring. You can refer to the screenshot for details. (Issue 2107))

  • The "Go: Extract to function" and "Go: Extract to variable" commands are no longer needed, as they have been replaced by Code Actions provided by gopls. (Issue 2862)

  • The "buildFlags" attribute for Go launch configuration now accepts more than one string. If using delve at v1.22.2 or newer, this list is passed directly to delve. This should help with bugs related to parsing the string of buildFlags, such as in Issue 1831 and Issue 1027. (Issue 3009)

  • The "Go: Toggle Hide System Goroutines" command makes it easier to switch between showing / hiding the system goroutines in the callstack view. This command is also available in the callstack context menu. The default setting can be updated by updating
    "hideSystemGoroutines" in either the launch.json or in the "go.delveConfig" setting. (Issue 1797)

Fixes

  • Environment variables may now be used in additional configuration settings. Environment variable references like ${env:VAR} in the go.toolsEnvVars setting (Issue 2680) and the go.goroot setting
    (Issue 3006) are now correctly substituted. Patterns like ${VAR} inside environment files (go.testEnvFile) can be used to reference other environment variables as well. (Issue 1902)

Compatibilities

  • This extension version requires VS Code 1.75 (January 2023 version) or newer. The README.md provides a list of VS Code and Go version requirements.
  • For tools installation managed by the extension, you need go1.18 or a newer version. (Issue 2898)
  • The extension has been tested with gopls v0.14 and delve v1.21.

Thanks

Thank you for your contribution @n1lesh, @suzmue, @hyangah!