vscode-go/CHANGELOG.md

36 KiB

0.6.62 - 9th June, 2017

Features

  • Jamie Stackhouse (@itsjamie)
    • New command Go: Generate interface stub to generate stubs that implement given interface using impl. PR 939
      • When the command is run, you are prompted to provide interface name. Eg: f *File io.Closer
      • The stubs are then generated where the cursor is in the editor.
  • 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 the env and/or envFile property in the debug configurations in the launch.json file.
  • 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 and go.vetOnSave now take values package, workspace or off instead of the previous true/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.
  • 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.

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.
  • 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

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 of go.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

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
  • Ramya Rao (@ramya-rao-a)
    • The command Go: Test Coverage In Current Package is renamed to Go: Toggle Test Coverage In Current Package and it does exactly what the name suggests. Toggles test coverage. Commit cc661daf

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 the backend property to native in the launch.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)
    • Fix for Bug 943 Live error reporting now works across multiple files in the current package, mapping errors to the correct files. PR 923
  • Guilherme Oenning (@goenning)
    • Fix for Bug 934 Environment variables from envFile attribute in the launch.json file is used while debugging and is overridden only by the ones in the env attribute. PR 935

Others

0.6.59 - 4th April, 2017

  • Tyler Bunnell (@tylerb)

    • Add live error feedback using gotype-live which is gotype 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 which gotype-live would be run post a keystroke
  • Eon S. Jeon (@esjeon)

    • 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 the env property as before
  • Ramya Rao (@ramya-rao-a)

    • --config flag for gometalinter 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 in go.addTags setting to selected struct fields. By default, json tags are added. Examples:
        • To add xml tags, set go.addTags to {"tags": "xml"}
        • To add xml with cdata option, set go.addTags to {"tags": "xml", "options": "xml=cdata"}
        • To add both json and xml tags, set go.addTags to {"tags": "json,xml"}
      • Go: Remove Tags command removes tags configured in go.removeTags setting from selected struct fields.
        • By default, all tags are removed.
        • To remove only say xml tags, set go.removeTags to {"tags": "xml"}
      • To be prompted for tags instead of using the configured ones, set go.addTags and/or go.removeTags to {"promptForTags": true}
    • Fix rename issue when diff tool from Git or Cygwin are in the PATH 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

Debugging improvements

  • Ramya Rao (@ramya-rao-a)
    • Support to build and run your Go file. PR 881
      • Press Ctrl+F5 or run the command Debug: 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 as debug and program that points to a Go file and not package
    • New envFile attribute in launch.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

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.
    • Go: Install Tools command now installs delve as well in Linux and Windows, but not in Mac OSX. Commit 30ea096 Fixes Bug 874
  • netroby @netroby
    • Go: Install Tools command now installs godoc. PR 854

Others

  • Ramya Rao (@ramya-rao-a)
    • Use GOPATH as defined by the go env output as default. Use go 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.
  • 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

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.

GOPATH improvements

  • Ramya Rao (@ramya-rao-a)
    • Fix for Bug 623. ${workspaceRoot} and ~ are now supported in go.gopath and go.toolsGopath settings. PR 768
    • The default GOPATH used by Go 1.8 when none is set as environment variable is now supported by the extension as well. PR 820
  • Vincent Chinedu Okonkwo (@codmajik)
    • Added new setting go.inferGopath. When true GOPATH will be inferred from the path of the folder opened in VS Code. This will override the value from go.gopath setting as well as the GOPATH environment variable. PR 762

Debugging improvements

  • Ramya Rao (@ramya-rao-a)
    • Debug current file without a launch configuration file. Simply press F5 to start the debug session. A launch.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
  • Rob Lourens (@roblourens)
    • Fix for Bug 438. Now when you stop a debug session, all processes started by the session will be closed as well. PR 765
  • Suraj Barkale (@surajbarkale-dolby)
    • Fix for Bug 782. Helpful error messages when the program attribute in launch.json file is invalid or not a full path. PR 790
  • F0zi (@f0zi)
    • Fix for Bug 689. When debugging against a remote machine, paths anywhere under the GOPATH will be correctly mapped so you can set breakpoints in them. Previously only paths next to the program could be debugged. PR 742

Testing improvements

  • Oleg Bulatov (@dmage)
    • Added new setting go.testOnSave. When true, 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
  • Jeff Willette (@deltaskelta)
    • Test output is no longer verbose by default. Add -v to the go.testFlags to get verbose output. PR 817

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)
    • Fix for Bug 777 Less disruptive experience during test failures when go.coveronSave is true.
    • Fix for Bug 680 Reduce noise in Go to Symbol in File feature by removing the entries corresponding to import statements. PR 775

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.
  • Ramya Rao (@ramya-rao-a)
    • All the "Install tool" options (the pop ups you see) and the Go: Install Tools command now support gometalinter 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 in go.toolsGopath

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
  • 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 be go.test.package, go.test.file or go.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 commands Go: Open Test File and Go: 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

0.6.52 - 5th January, 2017

  • Yuwei Ba (@ibigbug)
    • Use http.proxy setting while installing Go tools. PR 639
  • chronos (@bylevel)
    • Bug #465 Fix file outline when non English comments in file. PR 699
  • 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

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
  • Ramya Rao (@ramya-rao-a)
    • Revert changes done in the formatting area in 0.6.48 update. Fixes below bugs
      • #613 Format removes imports of vendored packages in use
      • #630 goreturns fails to consider global variables in package

0.6.49 - 10th November, 2016

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 deprecating go.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
      • #592 Use Go from GOROOT while installing tools PR 594
      • #585 Use fs.stat instead of fs.exists to avoid mistaking "go" folder as "go" file PR 595
      • #563 Dont run gotests on non Go files PR 584

0.6.47 - 26th October 2016

0.6.46 - 26th October 2016

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
  • Dan Mace (@ironcladlou
    • New command to execute the last run test. The command is Go: Test Previous PR #478
    • Send test output to a distinct output channel PR #499
  • Cedric Lamoriniere (@cedriclam)
    • New commands to generate unit test skeletons using gotests tool. Needs Go 1.6 or higher. PR #489
      • Go: Generate unit tests for current file
      • Go: Generate unit tests for current function
      • Go: Generate unit tests for current package
  • 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 since golint dropped support for Go 1.5 PR #509
    • Fix broken installation for goimports. PR #470 and PR #509
  • Arnaud Barisain-Monrose (@abarisain)
    • Fix broken installation for goreturns in Windows. PR #463

0.6.43 - August 2016

0.6.40-42 - July 2016