Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Releases: microsoft/vscode-go

Codelens to debug benchmarks, ability specify output option for delve and bug fixes

03 Apr 06:17
Compare
Choose a tag to compare

New Features and Enhancements

Bug Fixes

  • Kegsay @Kegsay

    • Fix bug where debug codelens would debug all tests that match the current test name. PR 1561
  • Nuruddin Ashr (@uudashr)

    • Fix bug where internal packages are allowed to be imported when their path is substring of current package. PR 1535
  • Ramya Rao (@ramya-rao-a)

    • Fix Go to Implementation feature when GOPATH is directly opened in VS Code. Bug 1545 and Bug 1554
    • Fix issue with debugging into std lib when remote debugging and remote path is a complete substring of the local path.

Fill struct fields with default values, show maps correctly when debugging and bug fixes

20 Feb 18:42
Compare
Choose a tag to compare

More bug fixes

11 Feb 03:32
Compare
Choose a tag to compare
* [Bug 1449](https://github.com/Microsoft/vscode-go/issues/1449): Rename fails due to cgo not being able to find the go executable.  
* [Bug 1508](https://github.com/Microsoft/vscode-go/issues/1508): Broken Path in Windows when running Go tools

Bug fixes and Bug fixes

09 Feb 01:48
Compare
Choose a tag to compare
  • Nikhil Raman (@cheesedosa)

    • Feature Request 1456: Show build/vet/lint status in status bar instead of opening output pane when run manually
  • Ramya Rao (@ramya-rao-a)

    • Bug 1470: Go: Build Workspace command or the setting "go.buildOnSave": "workspace" results in persistent error from trying to build the root directory with no Go files.
    • Bug 1469: Formatting adds �� in Chinese files some times.
    • Bug 1481: Untitled files in empty workspace results in build errors
    • Bug 1483: Generating unit tests for a function generates tests for other functions with similar names

Bug fixes

10 Jan 22:03
Compare
Choose a tag to compare
  • Ramya Rao (@ramya-rao-a)
    • Fix the issue that got introduced in the previous release, where formatter reverts changes unless goreturns is updated. Fixes Bug 1447
    • ~, $workspaceRoot and $workspaceFolder are now supported in the go.goroot setting
  • Ben Wood @(benclarkwood)
    • Collapse single line imports into an import block when auto-completing symbols from unimported packages or when using the Go: Add Import command. Fixes Bug 374 with PR 500

Snippet descriptions in auto-completions, warning when trying to edit generated files and bug fixes

05 Jan 19:42
Compare
Choose a tag to compare
  • Ramya Rao (@ramya-rao-a)

    • Setting go.inferGopath will now infer the correct GOPATH even in the below 2 cases which wasnt supported before
      • When a Go file is opened in VS Code directly without opening any workspace.
      • When GOPATH itself is directly opened in VS Code. Fixes Bug 1213
    • Use byte offset when calling gocode to fix issue with code completion when there are unicode characters in the file. Fixes Bug 1431
    • Add descriptions to the contributed snippets. These descriptions will appear in auto-completion and when using the Insert Snippet command
    • Fix "maxBufferExceeded" error by using spawn instead of exec when running formatters.
    • Use the new onDebugResolve activation event instead of onDebug to avoid activating the Go extension when other type of debug sessions are started
  • halfcrazy

  • Nikhil Raman (@cheesedosa)

Snippet for methods on types in auto-completions, linting experience improvements and more

19 Dec 07:07
Compare
Choose a tag to compare
  • Avihay Kain (@grooveygr)
  • Matt Brandt (@Matt007)
    • Debug configuration snippet for remote debugging. PR 1365
  • Ramya Rao (@ramya-rao-a)
    • Prompt to recompile dependent Go tools when GOROOT changes. Feature Request 1286
    • Support for ${workspaceFolder} in the below settings
      • go.gopath
      • go.toolsGopath
      • go.testEnvVars
      • go.testEnvFile
    • The Analysis Tools Missing message has bee updated to only appear for the tools backing basic features of the extension
    • Skip showing linting/vetting errors on a line that has build errors. Feature Request 600
    • Fix the issue of slow linters resulting in stale problem markers in updated file. Bug 1404
    • Deprecate go.formatOnSave setting in favor of editor.formatOnSave. To disable formatting on save, add the below setting:
      "[go]": {
          "editor.formatOnSave": false
      }
      
      This fixes the below issues
      • Cursor jumps unexpectedly when formatting on save. Bug 1346
      • Adopting the format on save feature of VS Code. Debt 540
      • Format-on-save messes up undo/redo stack Bug 678
      • FormatOnSave re-saves file Bug 1037
      • Save All doesnt format all files Bug 279
      • Slow format on save affects tests Bug 786

Build/vet/lint on demand, perf improvements, run benchmarks and more

27 Nov 19:40
Compare
Choose a tag to compare
  • New commands

  • Completion Improvements

  • Performance improvements

    • Ramya Rao (@ramya-rao-a)
      • The autobuild feature of gocode which is known to slow completions is now disabled by default. Fixes Bug 1323
        • Since we use the -i flag when building, we do not rely on autobuild feature of gocode to ensure fresh results from dependencies.
        • If you have disabled the buildOnSave setting, then use the new Go: Build Current Package command once in a while to ensure the dependencies are up to date or enable the go.gocodeAutoBuild setting.
      • In Go 1.9 and higher, running the vet feature in the absence of vet flags will be faster due to the use of go vet ./... instead of go tool vet -flags. Fixes Bug 1215
      • Performance issues caused by a large number of lingering processes for vet/lint/hover features are now solved.
        • Measures are now in place to kill older processes before starting new ones for vet/lint feature. Fixes Bug 1265
        • For other features like hover/outline/definition etc. the cancellation token provided by the core is used to kill processes if the corresponding request from the core is cancelled. Fixes Bug 667
  • Others

Using latest debug apis from VS Code and bug fixes

04 Nov 20:01
Compare
Choose a tag to compare

Multi-root support, Improvements to auto-completions, running/debugging tests and more..

02 Oct 22:53
Compare
Choose a tag to compare

Multi Root support when using VS Code Insiders

We now have Multi Root support for Go. PR 1221 Please note:

  • The settings at Folder level takes precedence over the ones at the Workspace level which in turn take precedence over the ones at the User level
  • You can have the different roots in the multi-root mode use different GOPATHs. The experimental language server feature is not supported in such cases though.
  • All current Go related features that refer to "workspace" will refer to the individual roots in the multi root mode. For example: Build/lint/vet/test workspace or Go to Symbol in workspace.
  • Give it a try and log any issues that you find in the vscode-go repo

Auto-completion improvements

  • Nuruddin Ashr (@uudashr)
    • Auto-completion for unimported packages that are newly installed/built will now show up without the need for reloading VS Code.
    • Completions from sub vendor packages that were showing up are ignored now. Fixes Bug 1251
    • The package snippet completion is now smarter when suggesting package names. PR 1220. It suggests
      • main when current file is main.go or there exists a main.go file in current folder
      • The folder name when the current file is internal_test.go
      • The folder name with _test when current file is a test file
      • If the folder name in above cases has - or ., then what appears after the - or . is suggested.
  • Alexander Kohler (@alexkohler)
    • A new setting go.useCodeSnippetsOnFunctionSuggestWithoutType is introduced. This allows completions of functions with their parameter signature but without the parameter types. Feature Request 1241
  • Miklós @kmikiy
    • 3 New snippets for the Log methods from the testing package

Improvements around running and debugging tests

  • zhouhaibing089 (@zhouhaibing089)
    • Running and debugging tests for packages in symlinked folders is now possible. PR 1164
  • Katsuma Ito (@ka2n)
    • The Debug Test codelens now uses the buildTags and buildFlags correctly. PR 1248
  • Chase Adams (@chaseadamsio)
    • You can now run tests from unsaved files. Fixes Bug 1225
  • Ramya Rao (@ramya-rao-a)
    • Changes done to coverage options and decorators in settings now apply immediately without the need for moving to another file and back. Fixes Bug 1171
    • The Run Test and Debug Test codelens react to change in the codelens setting immediately without the need for moving to another file and back. Fixes Bug 1172
    • $workspaceRoot will now be resolved when part of go.testEnvVars and go.toolsEnvVars setting.

Improvements around Packages

  • Nuruddin Ashr (@uudashr)
    • Go: Browse Packages command will now include newly installed/built packages without the need for reloading VS Code.
  • Hugo (@juicemia)
    • A new command Go: Get Package is introduced to run go get on the package in the import statement under the cursor. PR 1222