This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Releases: microsoft/vscode-go
Releases · microsoft/vscode-go
Bug Fixes
Go to Implementation using guru implements, test coverage shown right after testing package and bug fixes around remote debugging
- Dan Mace (@ironcladlou), Vincent Chinedu Okonkwo (@codmajik) & Dima (@hummerd)
- Support for the
Go To Implementation
command on interfaces. Feature Request #771.
- Support for the
- Craig-Stone (@Craig-Stone)
- Normalize program path in Windows which otherwise prevented breakpoints from being set correctly when remote debugging. PR 1131
- Marwan Sulaiman (@marwan-at-work)
- Refactor the code behind
Go: Browse Packages
to make browsing selected package faster. PR 1136
- Refactor the code behind
- Thomas Darimont (@thomasdarimont)
- A new snippet called
helloweb
that generates a web app with an http endpoint returning a greeting and current time. PR 1113
- A new snippet called
- Nuruddin Ashr (@uudashr)
- Refactor the way test output is shown to show output of
log.Println
. Fixes Issue #1120 with PR 1124
- Refactor the way test output is shown to show output of
- Ramya Rao (@ramya-rao-a)
- Test Improvements
- Show test coverage after the command
Go: Test Package
is run. You can disable this by settinggo.coverOnTestPackage
tofalse
. - Show test coverage even if files are outside of GOPATH. Fixes Issue #1122
- Decouple running test coverage on save from running build/lint/test on save. Fixes the issue where the problems view was not getting updated until
go.coverOnSave
was disabled.
- Show test coverage after the command
- Debugging Improvements
- No need to set GOPATH in debug configuration in the
launch.json
file anymore. When no GOPATH is provided this way, the debug adapter will now infer the GOPATH based on the path of the file/package being debugged. This fixes Issue #840. - The debug code lens will now honor the
go.buildFlags
,go.buildTags
andgo.testFlags
settings. Fixes Issue #1117 - Fix issue with stepping over standard library code when remote debugging in Windows. Fixes Issue #1178
- No need to set GOPATH in debug configuration in the
- Other Bug Fixes
- Fix the extra text being selected at the end of formatting run on save. Fixes Issue #899 and Issue #1096.
gometalinter
anddlv
will honor thego.toolsGopath
setting. Fixes Issue #1110- Skip vendor folders from lint and vet results. Fixes Issue #1119 and Issue #1121
- Test Improvements
Browse packages, use megacheck for linting, new subtle way to show code coverage and more ...
Features
- Ian Chiles (@fortytw2)
- Option to use megacheck as a linting tool which
can have significantly better performance thangometalinter
, while only supporting a subset of the tools. Use the settinggo.lintTool
to try this.
- Option to use megacheck as a linting tool which
- alexandrevez (@alexandrevez)
- Option to highlight gutters rather than full text for code coverage. Use the new setting
go.coverageDecorator
to try this.
- Option to highlight gutters rather than full text for code coverage. Use the new setting
- Ramya Rao (@ramya-rao-a) & Marwan Sulaiman (@marwan-at-work)
- Browse packages and go files with new command
Go: Browse Packages
. Feature Request 330- If cursor is on an import statement, then files from the imported package will be shown in the quick pick control
- Else, all packages are shown in the quick pick control. Select any and corresponding Go files will be shown next.
- Selecting any of the Go files, will open the file in a new editor.
- Browse packages and go files with new command
- Saud Khan (@bidrohi)
- Print import paths of Go tools as they get installed. PR 1032
- Ramya Rao (@ramya-rao-a)
- Prompt to update dependent Go tools when there is a change in the Go version. Feature Request 797
- Better user experience when dependent Go tools are missing. Feature Request 998
- Prompts will only show up for tools that are used for features that are explicitly executed by the user. Eg: Rename, Generate Unit Tests, Modify tags. And not for features that get triggered behind the scenes like linting, hover or format on save.
- When the prompts do show up, closing them will ensure that they wont show up for the duration of the current session of VS Code.
Bug Fixes
- llife0915 (@llife0915)
- Fix for issue when unverified breakpoints appeear when creating/deleting breakpoints once debugging starts in Windows.
- Roman Peshkov (@rpeshkov)
- Expand file names to file paths in test output for subtests. Bug 1049
- Guilherme Oenning (@goenning)
- Pass GOPATH to debug adapter when debugging tests via codelens. Bug 1057
- Nuruddin Ashr (@uudashr)
- Skip testing vendor folders when using the command
Go: Test all Packages in Workspace
- Skip testing vendor folders when using the command
- Ramya Rao (@ramya-rao-a)
- Start without debugging should fallback to debug mode when configured program is not a file. Bug 1084
- Fix for incorrect package name during autocomplete of unimported packages when package name is not the same as the last part of the import path. Bug 647
- Skip building vendor folders when
go.buildOnSave
is set toworkspace
. Bug 1060 - Honor
go.buildTags
when usinggogetdoc
. Bug 1024 - Fix build failure when
-i
is passed as a build flag. Bug 1064 - Fix vet failure when any flag is passed. Bug 1073
- Better formatting in import blocks when imports get added during auto-completion or when
Go: Add Import
command is used. Bug 1056 Go: Generate Interface Stubs
should work when interface is prefixed with package path
Generate stubs to implement interface, build/lint whole workspace and more..
0.6.62 - 9th June, 2017
Features
- Jamie Stackhouse (@itsjamie)
- Guilherme Oenning (@goenning)
- New setting
go.testEnvFile
to configure the location of a file that would have environment variables to use while running tests. PR 971- File contents should be of the form
key=value
. - Values from the existing setting
go.test.EnvVars
will override the above - These environment variables will also be used by the "Debug Test" codelens
- When debugging using the debug viewlet or pressing
F5
, the above will not be used. Continue to use theenv
and/orenvFile
property in the debug configurations in thelaunch.json
file.
- File contents should be of the form
- New setting
- Ole (@vapourismo)
- You can now run build/lint/vet on the whole workspace instead of just the current package on file save. PR 1023
- To enable this, the settings
go.buildOnSave
,go.lintOnSave
andgo.vetOnSave
now take valuespackage
,workspace
oroff
instead of the previoustrue
/false
. - These features are backward compatible and so if you are still using
true
/false
for these settings, they will work as they did before, but you will get a warning in your settings file.
- To enable this, the settings
- You can now run build/lint/vet on the whole workspace instead of just the current package on file save. PR 1023
- Ramya Rao (@ramya-rao-a)
- Better build performance when working on main packages and test files by using the
-i
flag. - Better linting experience while running
gometalinter
by using the--aggregate
flag which aggregates similar errors from multiple linters.
- Better build performance when working on main packages and test files by using the
Bug Fixes
- Ramya Rao (@ramya-rao-a)
- Fix for Bug 968 where rename fails if
---
is anywhere in the file - Fix for Bug 981 where
Go: Test Function At Cursor
fails. - Fix for Bug 983 where the Go binary is not found in MSYS2 as it is not located in GOROOT.
- Fix for Bug 1022 where snippets from function auto complete do not insert the placeholders
- Fix for Bug 962 where references codelens wouldnt work for methods.
- Fix for Bug 968 where rename fails if
- F0zi (@f0zi)
- Fix for Bug 1009 where remote debugging fails to verify breakpoint if GOPATH partially matches remote GOPATH
- Anton Kryukov (@Emreu)
- Use the
go.testEnvVars
while debugging tests using codelens
- Use the
Perf issue for references codelens fixed, setting to control both type of codelens
- Ramya Rao (@ramya-rao-a)
- Fix for Bug 963 Fix for perf issues when references codelens is enabled. Commit 352435a
- Fix for Bug 964 The setting
go.referencesCodeLens.enabled
is deprecated in favor ofgo.enableCodeLens
to control multiple types of codelens."go.enableCodeLens": { "references": false, "runtest": true }
Codelens for references, running and debugging tests. Toggle test coverage with new coverage options and more
Codelens for references, running and debugging tests
- theSoenke (@theSoenke)
- Feature Request 726: Display Reference count above functions using codelens. On clicking, the references are shown just like the
Find All References
command. PR 933 and PR 938. You can disable this by updating the settinggo.referencesCodeLens.enabled
.
- Feature Request 726: Display Reference count above functions using codelens. On clicking, the references are shown just like the
- Guilherme Oenning (@goenning)
- Use Codelens to run each test function, tests in the file and tests in the package. PR 937
- Ramya Rao (@ramya-rao-a)
- Feature Request 879: Use Codelens to debug a test function. Commit 5b1ced7
Test Coverage
- Thomas Bradford (@kode4food)
- New setting
go.coverageOptions
to control whether you want to highlight only covered code or only uncovered code or both when code coverage is run. PR 945
- New setting
- Ramya Rao (@ramya-rao-a)
- The command
Go: Test Coverage In Current Package
is renamed toGo: Toggle Test Coverage In Current Package
and it does exactly what the name suggests. Toggles test coverage. Commit cc661daf
- The command
Bug Fixes
- Ramya Rao (@ramya-rao-a)
- Fix for Bug 529 Code completion for unimported packages now works on unsaved file after deleting imports.
- Fix for Bug 922 Go to Symbol in File feature now includes symbols from unsaved file contents. PR 929
- Fix for Bug 878 Debugging now works on current file even when there is no folder/workspace open. Commit 42646afc
- Fix for Bug 947 Mac users using the latest delve from master may have this issue. You can now set the
backend
property in the debug config in thelaunch.json
file to get around this. Root cause is expected to be fixed in delve itself. Commit 4beecf1
- Tyler Bunnell (@tylerb)
- Guilherme Oenning (@goenning)
Others
- Luka Zakrajšek (@bancek) and Ramya Rao (@ramya-rao-a)
- New setting
go.toolsEnvVars
where you can specify env vars to be used by the Go tools that are used in the Go extension. PR 932 and commit bca4dd5f. This fixes Bug 632 as well.
- New setting
- Paweł Słomka (@slomek)
- New snippet for writing table driven tests. PR 952
Live error reporting, Test all packages in workspace and bug fixes
-
- Add live error feedback using
gotype-live
which isgotype
with support for unsaved file contents. PR 903- New setting
go.liveErrors
controls this feature. - Set
"go.liveErrors": { "enabled": true }
to enable this feature - Edit the delay property in
"go.liveErrors": { "enabled": true, "delay": 500 }
to update the delay (in milliseconds) after whichgotype-live
would be run post a keystroke - This feature will not come into affect if auto save is on. We will look into enabling this feature with auto save on in the next update
- New setting
- Add live error feedback using
-
- GOPATH from settings is now honored when users debug current file without having a
launch.json
file. PR 904- Note: Once you have a
launch.json
file, GOPATH from settings wont be read. You will need to set it in theenv
property as before
- Note: Once you have a
- GOPATH from settings is now honored when users debug current file without having a
-
--config
flag forgometalinter
now supports the use of${workspaceRoot}
and~
that allows users to provide config file path relative to workspace or home directory respectively. PR 909- New command
Go: Test All Packages in Workspace
to run tests from all packages in the workspace.
0.6.57
Modify struct tags, run without debugging, trace for language server, default GOPATH for Go 1.8 and more
Editing improvements
- Ramya Rao (@ramya-rao-a)
- Use gomodifytags to add/remove tags on selected struct fields. PR 880
- If there is no selection, then the whole struct under the cursor will be selected for the tag modification.
Go: Add Tags
command adds tags configured ingo.addTags
setting to selected struct fields. By default,json
tags are added. Examples:- To add
xml
tags, setgo.addTags
to{"tags": "xml"}
- To add
xml
withcdata
option, setgo.addTags
to{"tags": "xml", "options": "xml=cdata"}
- To add both
json
andxml
tags, setgo.addTags
to{"tags": "json,xml"}
- To add
Go: Remove Tags
command removes tags configured ingo.removeTags
setting from selected struct fields.- By default, all tags are removed.
- To remove only say
xml
tags, setgo.removeTags
to{"tags": "xml"}
- To be prompted for tags instead of using the configured ones, set
go.addTags
and/orgo.removeTags
to{"promptForTags": true}
- Fix rename issue when
diff
tool from Git or Cygwin are in thePATH
in Windows. PR 866 - Keywords are now supported in completion suggestions. PR 865
- Suggestion items to import packages disabled in single line import statements and the line with package definition where they do not make sense. PR 860
- Use gomodifytags to add/remove tags on selected struct fields. PR 880
Debugging improvements
- Ramya Rao (@ramya-rao-a)
- Support to build and run your Go file. PR 881
- Press
Ctrl+F5
or run the commandDebug: Start Without Debugging
to run using the currently selected launch configuration. - If you don't have a
launch.json
file, then the current file will be run. - Supported only for launch configs with
type
asdebug
andprogram
that points to a Go file and not package
- Press
- New
envFile
attribute inlaunch.json
where you can provide a file with env variables to use while debugging. PR 849 - Use current file's directory instead of folder opened in VS Code to debug in the default configurations. Commit 0915e50a
- Support to build and run your Go file. PR 881
Tooling improvements
- Ramya Rao (@ramya-rao-a)
- New Setting
go.languageServerFlags
that will be passed while running the Go language server. PR 882- Set this to
["trace"]
to see the traces from the language server in the output pane under the channel "go-langserver" - Set this to
["trace", "logfile", "path to a text file to log the trace]
to log the traces and errors from the language server to a file.
- Set this to
Go: Install Tools
command now installs delve as well in Linux and Windows, but not in Mac OSX. Commit 30ea096 Fixes Bug 874
- New Setting
- netroby @netroby
Go: Install Tools
command now installsgodoc
. PR 854
Others
- Ramya Rao (@ramya-rao-a)
- Use
GOPATH
as defined by thego env
output as default. Usego
binary from default platform specific locations when GOROOT is not set as env variable. Fixes Bug 873 - Fix compiling errors for vendor packages in case of symlinks. PR 864
- Support links in the test output, which then navigates the user to the right line of the test file where tests are failing. PR 885
- Experimental new setting
go.editorContextMenuCommands
to control which commands show up in the editor context menu.
- Use
- Albert Callarisa (@acroca) and Ramya Rao (@ramya-rao-a)
- New setting
go.gotoSymbol.ignoreFolders
that allows to ignore folders while using the "Go to Symbol in Workspace" feature. This takes in an array of folder names (not paths). Best used to ignore vendor folders while doing a workspace symbol search. PR 795
- New setting