Skip to content

Releases: golang/vscode-go

Release 0.17.2

01 Oct 20:13
Compare
Choose a tag to compare

v0.17.2 - 29th Sep, 2020

Fixes

  • Fixed a regression caused by the change for Issue 679.
    If go is not found from PATH available to the extension, the extension tries
    a couple of well-known default locations to find the go binary. In this case, we
    need to mutate PATH so other tools includinggopls or dlv can choose the
    same go version. (Issue 713).

Release 0.17.1

29 Sep 16:30
Compare
Choose a tag to compare

v0.17.1 - 28th Sep, 2020

Enhancement

  • Mutate the PATH/Path environment variable only if users
    explicitly configure to select the go command using go.goroot,
    go.alternateTools, or Go: Choose Go Environment menu.
    (Issue 679)
  • Includes sanitized gopls crash traces in the automated gopls crash report.
    (CL 256878)

Fixes

  • Changed the default of go.coverMode to be default. (Issue 666)
  • Fixed a missing promise reject when go is not found. (Issue 660)

Thank you for reporting issues!

Release 0.17.0

18 Sep 14:48
Compare
Choose a tag to compare

Go code debugging and code coverage support is getting better.

The extension will help you stay updated with the new Go releases.

New Features

  • Delve's call feature is now accessible. To use this feature, explicitly specify the call command. E.g. call myAwesomeFunc(). It is an experimental feature in Delve. Please see the current limitations. (Issue 100)
  • The extension checks the go official download site and notifies users of newly available Go versions. When a newer version is available,
    Go Update Available status bar item will appear. This feature is available only if go.useGoProxyToCheckForToolUpdates
    is set true. (Issue 483)
  • The new go.coverMode setting allows to use different coverage modes (atomic, count, set (default)). go.coverShowCounts,
    go.coverageDecorator.{coveredBorderColor, uncoveredBorderColor} were newly added. We are still investigating better ways to visualize the count coverage data; feedback and contribution is welcome! (Issue 256,
    594)

Enhancement

  • Expands '~' in the cwd attribute of the launch configuration. (Issue 116)
  • Debug config's showGlobalVariables is disabled by default, and this change improves speed. You can still inspect the global
    variables by registering them in the WATCH section, or by configuring showGlobalVariables in launch.json. (Issue 138)
  • gofumpt, gofumports is added to recognized formatters list. (Issue 587)
  • Automatically restarts the language server if go.toolsEnvVars configuration is changed. (CL 254370)
  • Reports go env failures. (Issue 555)

Fixes

  • Fixed to use absolute file paths in error messages appearing in the DEBUG OUTPUT. This allows VS Code to locate the correct files.
    (Issue 456)
  • Fixed handling of absolute file paths in coverage profile, on windows. (Issue 553)
  • Changed to pass GOROOT when invoking the gopkgs tool so gopkgs continues to work with different go versions without being recompiled. (CL 254137)
  • Fixed to provide explicit directory for running go list and go version. (Issue 610,
    CL 253600, 253602)
  • Fixed to trigger extension activation when commands for diagnostics, such as Go: Locate Configured Go Tools are invoked. (Issue 457)
  • Fixed to prepend GOROOT/bin to integrated terminal's PATH environment variable when go.goroot is set on OS X. (Issue 544)
  • Fixed to correctly apply environment variables setting read from envFile in the launch configuration. We reworked how the environment variables configuration is processed during this cycle. Now the extension processes the envFile attribute instead of asking the debug adapter process to read the specified envFile. (Issue 452)
  • Disabled go.installDependenciesWhenBuilding by default. When this is enabled, the extension runs go commands with -i, which is no longer recommended with recent versions of Go. (Issue 568)
  • Fixed a bug where we are not sending back 'configuration done' response. (Issue eclipse-theia/theia#8455, CL 254959)

Documentation

Code Health

  • Removed the obsolete string-type coverageDecorator support. (Issue 519)
  • When gopls integration tests fail, tests print the observed gopls traces to help debugging.

Experimental Features

  • We plan to delegate computation of various run test CodeLenses to gopls. This experimental feature can be enabled with the following setting:
"go.useLanguageServer": true,
"gopls": {
	"codelens": { "test": true }
}

Thanks

Thank you for your contribution, @suzmue, @pjweinbgo, @ekulabuhov, @stamblerre, @tpbg, @FiloSottile, @findleyr, @quoctruong, @polinasok, @hyangah!

Release 0.16.2

02 Sep 22:02
Compare
Choose a tag to compare

Fixed

  • Fixed the compile error message parsing bug that prevented correct file name expansion in test output. (Issue 522).
  • Fixed the regression that caused to run tests in the local directory mode and
    result in more verbose output than the package list mode. (Issue 528).
  • Fixed "go.alternateTools" settings to accept any tool names without
    settings.json diagnostics warning. (Issue 526)

Release 0.16.1

06 Aug 13:17
Compare
Choose a tag to compare

Fixed

  • Fixed the bug that made test output verbose by default (Issue 471).
  • Fixed the extension host crash bug due to a process-wide uncaught exception handler accidentally installed along with the inlined debug adapter. This crash bug also caused connection drops when used with the VS Code Remote extension (Issue 467, 469).
  • Readded the predefined variable resolution support for go.goroot and go.toolsEnvVars (Issue 464, 413).

Release 0.16.0

03 Aug 15:07
Compare
Choose a tag to compare

v0.16.0 - 3rd Aug, 2020

This version requires VS Code 1.46+.

Older versions of VS Code will not receive updates any more.

New Features

  • Users can select/install a different version of Go with Go: Choose Go Environment command.
    When clicking the Go status bar that displays the currently active Go version, users will be prompted with the list of Go versions installed locally or available for download. This feature was built based on the golang.org/dl tools. The selected Go version applies to the workspace, takes precedence over the system default or the "go.goroot" and "go.alternateTools" settings, and persists across sessions. You can clear the choice by selecting the Clear Selection item.
    (Issue 253)
  • When the Go version changes, the extension prepends $GOROOT/bin to the PATH or Path environment variable which then applies the change to the integrated terminal windows.
  • This version includes an experimental version of the new Debug Adapter that uses Delve's native DAP implementation. It currently supports launch type requests in debug or test mode. This is still in the early stages and requires dlv built from its unreleased, master branch. Subscribe to golang/vscode-go#23 for updates.

Enhancement

  • Bundles the extension using webpack, which reduced the extension size (4.7MB -> 1MB) and the extension loading overhead (3.4K files -> 3 files) (Issue 53).
  • Go: Apply Cover Profile applies code coverage for multiple packages (CL 238697). We fixed bugs in processing coverage profiles on Windows.
  • Suggests the official Go download page when no go tool is found.
  • Utilizes the GOMODCACHE environment variable, introduced in Go 1.15.
  • Prevents multiple debug sessions from launching (Issue 109).
  • Streams test output when tests run with the -v option.
    This feature requires 1.14 or newer versions of Go (Issue 316).
  • Sets additionalProperties to false for the settings that don't expect more properties. This allows VS Code to handle these settings better in its new settings GUI (Issue 284).
  • Go: Locate Configured Go Tools includes go env results (Issue 195).
  • Avoids prompting users to switch the default format tool in modules mode if users enable the language server.

Fixed

  • Fixed the PATH environment variable adjustment when users use a wrapper as an alternate tool for go (CL 239697).
  • Fixed a bug in test output processing, which prevented VS code from linking test log messages with locations in the source file.
  • Fixed a gocode-gomod installation bug when GOPATH includes multiple directories (Issue 368).
  • Avoids attempting to kill already terminated processes (Issue 334).
  • Fixed godef to locate standard packages correctly by passing the GOROOT environment variable.
  • Fixed a golangci-lint integration bug that prevented displaying the lint results correctly when linters like nolintlint are enabled (Issue 411).
  • Fixed lost test function name arguments when running Go: Test Previous (Issue 269).

Code Health

  • Many enhancements to improve test reliability and test coverage were made during this dev cycle.
  • TryBot is enabled, and the test results are posted to Gerrit CL. Currently, only the internal team members can see the details of the test results, but we will continue working to make them public.
  • Windows tests are now fixed and enabled in GitHub Action-based CI.
  • Refactored code shared by the extension and the debug adapters to prevent accidental debug adapter breakages.
  • Updated json-rpc2 and lodash to address vulnerability reports from npm audit.

Thanks

Thank you for your contribution, fujimoto kyosuke, OneOfOne, Aditya Thakral, Oleg Butuzov, Rebecca Stambler, Peter Weinberger, Brayden Cloud, Eli Bendersky, Robert Findley, Hana Kim!

Release 0.15.2

22 Jul 15:33
Compare
Choose a tag to compare

Fixed

  • Do not fail tools installation when gocode is not already running (Issue 355).

dev.go2go.20200722

22 Jul 20:44
Compare
Choose a tag to compare

A version of vscode-go to work with the new generics prototype. See golang/go#39619 for full context.
This is an updated version of https://github.com/golang/vscode-go/releases/tag/20200616.

Release 0.15.1

08 Jul 00:56
Compare
Choose a tag to compare

Enhancement

  • Improved gopls error report suggestion and changed to send reports to the vscode-go issue tracker instead of the go issue tracker (cl/240506).

Fixed

  • Removed the preview note in the published extension (Issue 273).

Release 0.15.0

29 Jun 20:56
Compare
Choose a tag to compare

New Features

  • The new command Go: Subtest At Cursor runs an individual subtest if the subtest's name is a simple string (cl/235447).
  • The new setting go.trace.server controls tracing between VS Code and the language server (cl/232458). Unlike tracing using gopls flags, this controls client-side tracing, and does not require to restart the server to change the value. This client-side trace is presented in the gopls output channel. The server-side trace has been moved to the new gopls (server) output channel (cl/233598).
  • There is now a new Go version status bar item. Clicking it currently only pops up the current GOROOT. We plan to add Go version switch, and other features using this status bar item.

Enhancement

  • Go: Add Tags To Struct Fields prompts transform parameter input if the setting go.addTags.promptForTags is true (Issue 2546).
  • Go: Locate Go Tools command output includes the GOBIN value. (cl/235197).
  • Improved debugging experience
    • The debug adapter automatically infers the mapping between remote and local paths for easy remote debugging (cl/234020, Issue 45).
    • The debug adapter handles errors that can occur during remote connection setup (cl/237550, Issue 215).
    • Failed watch expression evaluation no longer pops up error message windows. The error is visible in the watch window instead (cl/236999, Issue 143).
  • Better language server integration
    • Restart the language server automatically when changes in its configuration or the language server version are detected (cl/232598 cl/233159).
    • Prompts user to file an issue if gopls crashes (cl/233325).
  • go.gopath, go.goroot, go.toolsGopath are now machine-overridable (cl/236539, Issue 2981).
  • The extension does not mutate the GOROOT environment variable any more. go.goroot is used to select the go command under the specified directory (Issue 146).
  • A redundant code action provider was removed when using the language server (cl/239284).

Fixed

  • Fixed gopls version detection and upgrade logic when pre-release versions are involved (cl/235524).
  • Processes started with Run > Run Without Debugging (^F5) are now cleaned up when the run sessions end (cl/236879).
  • When go.alternateTools.go is set, the path to $(go env GOROOT)/bin is passed to underlying tools to ensure they use the same go version (cl/239697).
  • Now the extension avoids invoking buggy pgrep on mac OS (cl/236538, Issue 90).

Code Health

  • More test coverage
    • Added new tests for gopls update logic (cl/233158), tools installation behavior (cl/233557).
    • Fixed Build Tags checking tests (cl/233517).
  • Upgraded dependencies including websocket-extensions from 0.1.3 to 0.1.4 (cl/228617, cl/236839, pr/3261).

Thanks

Thank you for your contribution, Brayden Cloud, Bulent Rahim Kazanci, Eli Bendersky, Hana Kim, Polina Sokolova, Quoc Truong, Rebecca Stambler, Rohan Talip, Ryan Koski, Sean Caffery, Ted Silbernagel, Vincent Jo, and codekid!