36 KiB
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
0.6.61 - 4th May, 2017
- 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 }
0.6.60 - 3rd May, 2017
Codelens for references, to run and debug 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 see that all env variables are empty while debugging their code. This is due to delve using the
--backend=lldb
option in Mac by default. You can now change this default value by setting thebackend
property tonative
in thelaunch.json
file. Commit 4beecf1. Root cause is expected to be fixed in delve itself and is being tracked in derekparker/delve/818
- 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
0.6.59 - 4th April, 2017
-
- 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
- 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 - 30th March, 2017
Fix for Bug 892 which breaks build when the user has multiple GOPATHs and the Go project being worked on is not the first one among the multiple GOPATHs. Commit d417fd6
0.6.56 - 29th March, 2017
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
0.6.55 - 3rd March, 2017
- Re-publishing the extension from a non Windows machine as the fix for Bug 438 worked only on Windows machines. For details read the discussion in PR 838.
0.6.54 - 28th February, 2017
Tooling improvements
- Ramya Rao (@ramya-rao-a) and Sourcegraph
- A new setting
go.useLanguageServer
to use the Go language server from Sourcegraph for features like Hover, Definition, Find All References, Signature Help, Go to Symbol in File and Workspace. PR 750- This is an experimental feature and is not available in Windows yet.
- If set to true, you will be prompted to install the Go language server. Once installed, you will have to reload VS Code window. The language server will then be run by the Go extension in the background to provide services needed for the above mentioned features.
- A new setting
GOPATH improvements
- Ramya Rao (@ramya-rao-a)
- Vincent Chinedu Okonkwo (@codmajik)
- Added new setting
go.inferGopath
. Whentrue
GOPATH will be inferred from the path of the folder opened in VS Code. This will override the value fromgo.gopath
setting as well as the GOPATH environment variable. PR 762
- Added new setting
Debugging improvements
- Ramya Rao (@ramya-rao-a)
- Debug current file without a launch configuration file. Simply press
F5
to start the debug session. Alaunch.json
is still required to debug tests or for advanced debug configurations. PR 769 - Launch configuration snippets are now available for common scenarios like debugging file/package or debugging a test package/function.
These snippets can be used through IntelliSense when editing the
launch.json
file. PR 794 - Fix for Bug 492. Now when there are build errors, starting a debug session will display the error instead of hanging. PR 774
- Debug current file without a launch configuration file. Simply press
- Rob Lourens (@roblourens)
- Suraj Barkale (@surajbarkale-dolby)
- F0zi (@f0zi)
Testing improvements
- Oleg Bulatov (@dmage)
- Added new setting
go.testOnSave
. Whentrue
, all tests in the current package will be run on saving a Go file. The status of the tests will be shown in the status bar at the bottom of the VS Code window. It is not advised to have this on when you have Auto Save enabled. PR 810
- Added new setting
- Jeff Willette (@deltaskelta)
- Test output is no longer verbose by default. Add
-v
to thego.testFlags
to get verbose output. PR 817
- Test output is no longer verbose by default. Add
Other Bug Fixes
- Richard Musiol (@neelance)
- Fix offset for files with multibyte characters so that features like Hover and Go To Definition work as expected. PR 780
- Ramya Rao (@ramya-rao-a)
0.6.53 - 30th January, 2017
Installation improvements
- Sam Herrmann (@samherrmann), Ramya Rao (@ramya-rao-a)
- A new setting
go.toolsGopath
for providing an alternate location to install all the Go tools that the extension depends on, if you don't want them cluttering your GOPATH. PR 351 and PR 737.- This is useful when you work on different GOPATHs.
- Remember to run
Go: Install Tools
command to install the tools to the new location.
- A new setting
- Ramya Rao (@ramya-rao-a)
- All the "Install tool" options (the pop ups you see) and the
Go: Install Tools
command now supportgometalinter
if it is your chosen linting tool. PR 735.- Since
gometalinter
internally installs linters and expects them to be in the user's GOPATH,gometalinter
will get installed to your GOPATH and not the alternate location specified ingo.toolsGopath
- Since
- All the "Install tool" options (the pop ups you see) and the
Build improvements
- Matt Aimonetti (@mattetti)
- While building, we now use the
-i
flag (for non main packages) which installs dependent packages, which in turn get used in subsequent builds resulting in faster builds in bigger workspaces. PR 718
- While building, we now use the
- Ramya Rao (@ramya-rao-a)
- Build errors with no line numbers (for eg. Import cycle) are now displayed in the output window and will be mapped to the first line of the file. PR 740
Test improvements
- Ramya Rao (@ramya-rao-a)
-
A new setting
go.testFlags
that can be used to run tests. If null,go.buildFlags
will be used. PR 482 -
Customize flags for each of the test command by using different keybindings. PR 482. In the below example,
ctrl+shift+t
is bound to run the tests in current file with-short
flag. The commands here can bego.test.package
,go.test.file
orgo.test.cursor
.{ "key": "ctrl+shift+t", "command": "go.test.file", "args": { "flags": ["-short"] }, "when": "editorTextFocus" }
-
New toggle command
Go: Toggle Test File
that lets you toggle between your Go file and the corresponding test file. Previous commandsGo: Open Test File
andGo: Open Implementation For Test File
have been deprecated in favor of this new command. PR 739. You can add a keyboard binding to this as below:{ "key": "ctrl+shift+t", "command": "go.toggle.test.file", "when": "editorTextFocus && editorLangId == 'go'" }
-
If current file is not a test file, show error message while running test commands, instead of displaying success message. Fixes #303
-
- Marcel Voigt (@nochso)
- Show error message in output window when running test coverage fails. PR 721
Debugging improvements
- Andreas Kuhn (@ankon)
- Honor the
cwd
launch configuration argument. PR 714
- Honor the
- Ramya Rao (@ramya-rao-a)
- GOPATH set in the
env
property inlaunch.json
will also be used to finddlv
tool. PR 725.
- GOPATH set in the
- Rob Lourens (@roblourens)
- New property
trace
inlaunch.json
to provide option to have verbose logging while debugging using vscode-debug-logger. PR 753. This will help in diagnosing issues with debugging in the Go extension.
- New property
0.6.52 - 5th January, 2017
- Yuwei Ba (@ibigbug)
- Use
http.proxy
setting while installing Go tools. PR 639
- Use
- chronos (@bylevel)
- Ramya Rao (@ramya-rao-a)
- Implement Step Out in debgging Commit 6d0f440
- Improve performance by reducing number of calls to
godoc
,godef
,gogetdoc
. PR 711 - Default value for
go.autocompleteUnimportedPackages
is now false to reduce noise in the suggestion list. Members of unimported packages will still show up in suggestion list after typing dot after package name.
0.6.51 - 29th November, 2016
- Jimmy Kuu (@jimmykuu)
- Remove blank space in the end of code snippet on function suggest. PR 628
- Ahmed W. (@OneofOne)
- Remove the multiple -d flags in formatting. PR 644
- Paweł Kowalak (@viru)
- Snippet for Benchmark Test function. PR 648
- Alberto García Hierro (@fiam)
- Fix Go To Definition, Hover and Signature Help when using Go from tip. PR 655
- Cedric Lamoriniere (@cedriclam)
- Fix Generate Test for Current function when the function is a method on a type. PR 657
- Potter Dai (@PotterDai)
- Fix Find all References when using multiple GOPATH where one is the substring of the other. PR 658
- Ramya Rao (@ramya-rao-a)
0.6.50 - 21st November, 2016
- lixiaohui (@leaxoy), Arnaud Barisain-Monrose (@abarisain), Zac Bergquist (@zmb3) and Ramya Rao (@ramya-rao-a)
- Added option to use
gogetdoc
for Goto Definition , Hover and Signature Help features. PR 622 To use this, add a setting"go.docstool": "gogetdoc"
to your settings and reload/restart VS Code. This fixes the below bugs- #440 Hover info does not show doc string for structs
- #442 Goto Definition, Hover, Signature Help do not work for
net
package - #496 Goto Definition, Hover, Signature Help do not work for Dot imported functions
- #515 Go to definition and type info doesn't work with mux.Vars or anything else from gorilla/mux
- #567 Signature Help and Quick Info do not show function comments for unexported functions
- Added option to use
- Ramya Rao (@ramya-rao-a)
0.6.49 - 10th November, 2016
- Ramya Rao (@ramya-rao-a)
- Revert the deprecation of
go.formatOnSave
due to popular demand.
- Revert the deprecation of
0.6.48 - 9th November, 2016
- Mark LaPerriere (@marklap)
- Snippets for method declaration, main and init functions PR 602
- Rob Lourens @roblourens
- launch.json intellisense to include all "mode" values. Fixes #574
- Ramya Rao (@ramya-rao-a)
- Support for
editor.formatOnSave
and deprecatinggo.formatOnSave
PR 578 - Remove deprecated language configuration settings PR 587
- Feature Request 432: Commands to switch to test file and back. PR 590. You can add your own shortcuts for these commands.
Go: Open Test File
Go: Open Implementation for Test File
- Navigate to test file after generating unit tests using the
Go: Generate unit tests ...
commands. PR 610 - Prompt to set GOPATH if not set already PR 591
- Improvements to auto complete
- #389 Fix issue with autocomplete popping up at the end of a string PR 586
- #598 Importable packages in auto complete should appear after rest of the suggestions. PR 603
- #598 Importing vendored packages from other Go projects should not be allowed. PR 605
- #598 When there is an identifier with same name as an available package, do not show the package in the compeltion list PR 608
- Other Bug Fixes
- Support for
0.6.47 - 26th October 2016
- Rob Lourens @roblourens
- Fix the regression in debugging PR #576
- Ramya Rao(@ramya-rao-a)
- Preserve focus in editor when running tests PR #577
0.6.46 - 26th October 2016
- Ramya Rao(@ramya-rao-a)
- Rob Lourens @roblourens
- Use random port number while debugging PR #553
0.6.45 - 17th October 2016
0.6.44 - 12th October 2016
- Ludwig Valda Vasquez (@bredov)
- New configuration
go.formatFlags
to pass flags to the formatting tool PR #461
- New configuration
- Dan Mace (@ironcladlou
- Cedric Lamoriniere (@cedriclam)
- New commands to generate unit test skeletons using
gotests
tool. Needs Go 1.6 or higher. PR #489Go: Generate unit tests for current file
Go: Generate unit tests for current function
Go: Generate unit tests for current package
- New commands to generate unit test skeletons using
- Ramya Rao (@ramya-rao-a)
- New configuration
go.testEnVars
to pass environment variables to Go tests PR #498 - Changes made to GOROOT and GOPATH via settings now take effect immediately without requiring to reload/restart VS Code PR #458
- Go extension ready to use after installing tools without requiring to reload/restart VS Code PR #457
- Enable Undo after Rename. PR #477. Needs
diff
tool which is not available on Windows by default. You can install it from DiffUtils for Windows - Autocomplete for functions from unimported packages and for unimported packages themselves. To enable this set
go.autocompleteUnimportedPackages
to true. PR #497 - Do not allow to import already imported packages via the
Go: Add Import
command. PR #508 - Suggest
gometalinter
to Go 1.5 users sincegolint
dropped support for Go 1.5 PR #509 - Fix broken installation for
goimports
. PR #470 and PR #509
- New configuration
- Arnaud Barisain-Monrose (@abarisain)
- Fix broken installation for
goreturns
in Windows. PR #463
- Fix broken installation for
0.6.43 - August 2016
- Matt Aimonetti (@mattetti)
- New command to install/update all Go tools that the Go extension needs. The command is
Go: Install Tools
PR #428
- New command to install/update all Go tools that the Go extension needs. The command is
- Ryan Veazey (@ryanz)
- Auto-generated launch.json to have
showLog:true
. PR #412
- Auto-generated launch.json to have
- Arnaud Barisain-Monrose (@abarisain)
- Updates to Extra Info feature: Documentation from
godoc
now appears on hover PR #424
- Updates to Extra Info feature: Documentation from
0.6.40-42 - July 2016
- Sajjad Hashemian (@sijad)
- Option to choose
gometalinter
as tool for linting PR #294
- Option to choose
- Bartosz Wróblewski (@bawr)
- New configuration
showLog
to toggle the debugging output fromdelve
PR #352
- New configuration
- benclarkwood (@benclarkwood)
- Better logging while installing tools PR #375