diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7edb98f6fe..508a663045 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,7 +8,8 @@ assignees: '' --- For asking questions, see: -- [GitHub Discussions (Q&A)](https://github.com/golang/vscode-go/discussions/categories/q-a) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/go+visual-studio-code) +- [GitHub Discussions (Help)](https://github.com/golang/vscode-go/discussions/categories/help) - [`#vscode` channel in Gophers Slack](https://invite.slack.golangbridge.org/messages/vscode) Before filing an issue, please review our troubleshooting guides diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 064afa8275..fe86b8b28f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Question - url: https://invite.slack.golangbridge.org/ - about: Ask and answer questions on the `#vscode` channel in Gophers Slacks. + url: https://stackoverflow.com/questions/tagged/go+visual-studio-code + about: Ask and answer questions on Stack Overflow. diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 914c4f4460..76776cc5ed 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,6 +1,6 @@ For asking questions, visit: -* `#vscode` channel in [Gophers Slack](https://gophers.slack.com) for general questions. -* `#vscode-dev` channel in [Gophers Slack](https://gophers.slack.com) for extension development-related questions. - -Use the [invite app](https://invite.slack.golangbridge.org/) for access. +* [Stack Overflow](https://stackoverflow.com/questions/tagged/go+visual-studio-code) +* [Gophers Slack](https://gophers.slack.com) - Use the [invite app](https://invite.slack.golangbridge.org/) for access. + * `#vscode` channel for general questions + * `#vscode-dev` channel for extension development-related questions diff --git a/.github/release_plan.md b/.github/release_plan.md index 571894e0af..0abb349a5e 100644 --- a/.github/release_plan.md +++ b/.github/release_plan.md @@ -4,15 +4,15 @@ - [ ] Create a milestone with the issues that are fixed by this release - [ ] Update `master` for the release - [ ] Update hardcoded latest version for `dlv-dap` and `gopls` + - [ ] Update [`CHANGELOG.md`](https://github.com/golang/vscode-go/blob/master/CHANGELOG.md) + - [ ] Make sure the "Thanks" section is up-to-date + - [ ] Check the Markdown rendering to make sure everything looks good - [ ] Update `release` for the release - [ ] Create a branch against `release` for a pull request - [ ] Merge changes from `master` to prepare for the release - [ ] Change the version in [`package.json`](https://github.com/golang/vscode-go/blob/master/package.json) from a `-dev` suffix - [ ] Run `npm install` to make sure [`package-lock.json`](https://github.com/golang/vscode-go/blob/master/package.json) is up-to-date - [ ] Update the license file (`$ tools/license.sh; mv LICENSE.prod LICENSE`) - - [ ] Update [`CHANGELOG.md`](https://github.com/golang/vscode-go/blob/master/CHANGELOG.md) - - [ ] Make sure the "Thanks" section is up-to-date - - [ ] Check the Markdown rendering to make sure everything looks good - [ ] Check the [Long Tests status](https://github.com/golang/vscode-go/actions?query=workflow%3A%22Long+Tests%22) is green. Otherwise, fix the tests, send cls for review, submit them, and repeat. - [ ] Perform manual [smoke tests]( https://github.com/golang/vscode-go/blob/master/docs/smoke-test.md) - [ ] Create new version tag for X.XX.X-rc.1 at gerrit’s vscode-go [repo management page](https://go-review.googlesource.com/admin/repos/vscode-go,tags) @@ -20,7 +20,7 @@ - [ ] Ask editor team and contributors to this release to test the release candidate # Release Candidate >1 (if necessary) -- ] Fix any bugs on `master` and cherry pick changes to `release +- [ ] Fix any bugs on `master` and cherry pick changes to `release - [ ] Create new version tag for X.XX.X-rc.1 at gerrit’s vscode-go [repo management page](https://go-review.googlesource.com/admin/repos/vscode-go,tags) - [ ] Go to the release page https://github.com/golang/vscode-go/releases and check if the new release candidate is up. If necessary, you can manually edit the comment by clicking the “Edit” button. Don’t mutate uploaded vsix. - [ ] Ask editor team and contributors to this release to test the release candidate @@ -36,4 +36,3 @@ - [ ] Bump the version number to the next monthly ("X.XX.X-dev") release in the `master` branch - [ ] `package.json` - [ ] `package-lock.json` - - [ ] Cherry pick CHANGELOG.md back to master diff --git a/.github/workflows/test-long-all.yml b/.github/workflows/test-long-all.yml index 6a1bbad14d..4da59bca52 100644 --- a/.github/workflows/test-long-all.yml +++ b/.github/workflows/test-long-all.yml @@ -17,7 +17,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] version: ['stable', 'insiders'] - go: ['1.15', '1.16'] + go: ['1.15', '1.16', '1.17.0-rc1'] steps: - name: Clone repository diff --git a/.github/workflows/test-long.yml b/.github/workflows/test-long.yml index e26ef7dd12..0ef3361182 100644 --- a/.github/workflows/test-long.yml +++ b/.github/workflows/test-long.yml @@ -16,7 +16,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] # TODO: reenable macos-latest version: ['stable'] - go: ['1.15', '1.16'] + go: ['1.15', '1.16', '1.17.0-rc1'] steps: - name: Clone repository diff --git a/.vscode/launch.json b/.vscode/launch.json index 25075bc9c9..e01b1df458 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,14 @@ { "version": "0.2.0", "configurations": [ + { + "name": "Launch tools/generate", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/tools/generate.go", + "cwd": "${workspaceFolder}" + }, { "name": "Launch Extension", "type": "extensionHost", diff --git a/CHANGELOG.md b/CHANGELOG.md index d2f8be8729..9f53ac6f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,45 @@ -## V0.26.0 - 17 Jun, 2021 +## v0.27.0 - 9 Aug, 2021 + +📣 Delve's native DAP implementation ([`dlv-dap`](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md)) +is enabled by default for local debugging. We updated the [Documentation for Debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) +to show the new features available with dlv-dap. This change does not apply to remote debugging yet. +For remote debugging, keep following the instruction in the +[legacy debug adapter documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md). + +A list of all issues and changes can be found in the [v0.27.0 milestone](https://github.com/golang/vscode-go/milestone/33?closed=1) and [commit history](https://github.com/golang/vscode-go/compare/v0.26.0...v0.27.0). + +### Enhancements +- The new [`go.terminal.activateEnvironment`](https://github.com/golang/vscode-go/blob/master/docs/settings.md#goterminalactivateenvironment) +allows to prevent the extension from changing integrated terminal's environment variables. ([Issue 1558](https://github.com/golang/vscode-go/issues/1558), [1098](https://github.com/golang/vscode-go/issues/1098)) +- The [`Go: Locate Configured Go Tools`](https://github.com/golang/vscode-go/blob/master/docs/commands.md#go-locate-configured-go-tools) +command prints the build information of detected tools. +- Use `dlv-dap` as the default debug adapter for local debugging. The new debug adapter offers +[many new features and improvements](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aclosed+label%3AFixedInDlvDAPOnly). +- Added Gitpod to a recognized Cloud-based IDE, for which the extension will minimize the number of toast or notification messages. ([Issue 1616](https://github.com/golang/vscode-go/issues/1616)) +- The [`Go: Subtest At Cursor`](https://github.com/golang/vscode-go/blob/master/docs/commands.md#go-subtest-at-cursor) command prompts for subtest name if there is no subtest at cursor ([Issue 1602](https://github.com/golang/vscode-go/issues/1602)). + +### Fixes +- Debugging + - Setting the `logOutput` property without `showLog: true` does not break debugging any more. + - Fixed a bug in the legacy debug adapter that caused jumping at each step after upgrading to VS Code 1.58+. ([Issue 1617](https://github.com/golang/vscode-go/issues/1617), [1647](https://github.com/golang/vscode-go/issues/1647)) + - Fixed a bug that broke Attach mode debugging using the legacy debug adapter if `cwd` is not set. ([Issue 1608](https://github.com/golang/vscode-go/issues/1608)) + - Made the `dlv-dap` mode ignore the `port` property. It was initially suggested as a temporary alternative + to the remote debugging, but we decided to revisit the functionality for better remote debugging support. + Use the `debugServer` property if you want to connect to a manually launched `dlv dap` server. + +### Code Health +- The version of `dlv-dap` is pinned to [v1.7.1-0.20210804080032-f95340ae1bf9](https://github.com/go-delve/delve/tree/f95340ae1bf9fed8740d5fd39f5758d41770d967) and `dlv-dap` is marked as a required tool. +- Updated the hard-coded default gopls version string to v0.7.1. +- Added `tools/relnotes`, a script to help generate CHANGELOG.md. +- Added go1.17 RC to CI. ([Issue 1640](https://github.com/golang/vscode-go/issues/1640)) +- Enabled tests that were skipped in dlv-dap mode since dlv-dap reached feature parity. +- Use StackOverflow as the channel for Q&A. + +### Thanks + +Thank you for your contribution, Ahmed W, Hana, Michael Currin, Polina Sokolova, Rebecca Stambler, Suzy Mueller, and Sven Efftinge! + +## v0.26.0 - 17 Jun, 2021 📣 [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) is now available for use. In order to use this new debug adapter (`dlv-dap`) when debugging Go programs, add the following settings in your `settings.json`: diff --git a/README.md b/README.md index d68e749339..f77ecae818 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ provides rich language support for the [Go programming language](https://golang.org/). -> 📣 Debugging using [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) is now available for use.
-> Please test it by following [the instruction to enable this new feature](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started) and share your feedback! + +> 📣 Debugging using [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) is enabled by default in v0.27.0.
## Quick Start @@ -130,8 +130,7 @@ troubleshooting](docs/troubleshooting.md), and another specifically for If the troubleshooting guides did not resolve the issue, please reach out to us by [filing an issue](https://github.com/golang/vscode-go/issues/new/choose), [starting a GitHub discussion](https://github.com/golang/vscode-go/discussions), -or by asking a question in the [Gophers Slack]. We hang out in the `#vscode` -channel! +or by asking a question on [Stack Overflow]. Also, you can take a look at [learn.go.dev](https://learn.go.dev) and [golang.org/help](https://golang.org/help) for more general guidance on using @@ -161,7 +160,7 @@ conduct-related issue, please mail conduct@golang.org. [MIT](LICENSE) -[Gophers Slack]: https://gophers.slack.com/ +[Stack Overflow]: https://stackoverflow.com/questions/tagged/go+visual-studio-code [`gopls`]: https://golang.org/s/gopls [`go`]: https://golang.org/cmd/go [Managing extensions in VS Code]: https://code.visualstudio.com/docs/editor/extension-gallery diff --git a/docs/contributing.md b/docs/contributing.md index 5fe1cad0bc..a7d37b7bf6 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -34,7 +34,7 @@ Please note that extra configuration is required to build and run the [Debug Ada ### Setup -1) Install [node](https://nodejs.org/en/). +1) Install [node](https://nodejs.org/en/). Note: make sure that you are using `npm v7` or higher. The file format for `package-lock.json` (changed significantly)[https://docs.npmjs.com/cli/v7/configuring-npm/package-lock-json#file-format] in `npm v7`. 2) Clone the repository, run `npm install`, and open VS Code: ```bash diff --git a/docs/debugging-legacy.md b/docs/debugging-legacy.md new file mode 100644 index 0000000000..f19622114b --- /dev/null +++ b/docs/debugging-legacy.md @@ -0,0 +1,458 @@ +# Debugging with Legacy Debug Adapter + +The Go extension historically used a small adapter program to work with the Go debugger, [Delve]. +The extension transitioned to communicate with [Delve] directly but there are still cases you may +need to use the legacy debug adapter (e.g. remote debugging). This document explains how to use the +***legacy*** debug adapter. + + +* [Set up](#set-up) + * [Installation](#installation) + * [Configuration](#configuration) +* [Launch Configurations](#launch-configurations) + * [Specifying build tags](#specifying-build-tags) + * [Specifying other build flags](#specifying-other-build-flags) + * [Using VS Code Variables](#using-vs-code-variables) + * [Snippets](#snippets) +* [Debugging on Windows Subsystem for Linux (WSL)](#debugging-on-windows-subsystem-for-linux-wsl) +* [Remote Debugging](#remote-debugging) +* [Troubleshooting](#troubleshooting) + * [Read documentation and common issues](#read-documentation-and-common-issues) + * [Update Delve](#update-delve) + * [Check for multiple versions of Delve](#check-for-multiple-versions-of-delve) + * [Check your launch configuration](#check-your-launch-configuration) + * [Check your GOPATH](#check-your-gopath) + * [Enable logging](#enable-logging) + * [Optional: Debug the debugger](#optional-debug-the-debugger) + * [Ask for help](#ask-for-help) +* [Common issues](#common-issues) + +## Set up + +[Delve] (`dlv`) should be installed by default when you install this extension. +You may need to update `dlv` to the latest version to support the latest version +of Go. To install or update `dlv`, open the [Command Palette][] +(Windows/Linux: Ctrl+Shift+P; OSX: Shift+Command+P), select [`Go: Install/Update Tools`](settings.md#go-installupdate-tools), and select [`dlv`](tools.md#dlv). + +## Selecting `legacy` debug adapter + +To opt in to use the legacy debug adapter (`legacy`) by default, add the following in your VSCode settings.json. + +``` + "go.delveConfig": { + "debugAdapter": "legacy", + } +``` + +If you want to use the legacy mode for only a subset of your launch configurations, you can use [the `debugAdapter` attribute](#launchjson-attributes) to switch between `"dlv-dap"` and `"legacy"` mode. +For [Remote Debugging](#remote-debugging) (launch configuration with `"mode": "remote"` attribute), +the extension will use the `"legacy"` mode by default, so setting this attribute won't be necessary. + +Throughout this document, we assume that you opted in to use the legacy debug adapter. +For debugging using the new debug adapter (default, `"dlv-dap"` mode), please see the documentation about [Debugging](https://github.com/golang/vscode-go/tree/master/docs/debugging-legacy.md). + +### Configuration + +You may not need to configure any settings to start debugging your programs, but you should be aware that the debugger looks at the following settings. + +* Related to [`GOPATH`](gopath.md): + * [`go.gopath`](settings.md#go.gopath) + * [`go.inferGopath`](settings.md#go.inferGopath) +* [`go.delveConfig`](settings.md#go.delveConfig) + * `apiVersion`: Controls the version of the Delve API used (default: `2`). + * `dlvLoadConfig`: The configuration passed to Delve, which controls how variables are shown in the Debug pane. Not applicable when `apiVersion` is 1. + * `maxStringLen`: Maximum number of bytes read from a string (default: `64`). + * `maxArrayValues`: Maximum number of elements read from an array, slice, or map (default: `64`). + * `maxStructFields`: Maximum number of fields read from a struct. A setting of `-1` indicates that all fields should be read (default: `-1`). + * `maxVariableRecurse`: How far to recurse when evaluating nested types (default: `1`). + * `followPointers`: Automatically dereference pointers (default: `true`). + * `showGlobalVariables`: Show global variables in the Debug view (default: `false`). + * `debugAdapter`: Controls which debug adapter to use (default: `legacy`). + * `substitutePath`: Path mappings to apply to get from a path in the editor to a path in the compiled program (default: `[]`). + +There are some common cases when you might want to tweak the Delve configurations. + +* To change the default cap of 64 on string and array length when inspecting variables in the Debug view, set `maxStringLen`. (See a related known issue: [golang/vscode-go#126](https://github.com/golang/vscode-go/issues/126)). +* To evaluate nested variables in the Run view, set `maxVariableRecurse`. + +## Launch Configurations + +To get started debugging, run the command `Debug: Open launch.json`. If you did not already have a `launch.json` file for your project, this will create one for you. It will contain this default configuration, which can be used to debug the current package. With mode `auto`, the file that is currently open will determine whether to debug the program as a test. If `program` is instead set to a Go file, that file will determine which mode to run in. + +```json5 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${fileDirname}", + "debugAdapter": "legacy", + "env": {}, + "args": [] + } + ] +} +``` + +There are some more properties that you can adjust in the debug configuration: + +Property | Description +-------- | ----------- +name | The name for your configuration as it appears in the drop-down in the Run view. +type | Always leave this set to `"go"`. VS Code uses this setting to determine which extension should be used for debugging. +request | One of `launch` or `attach`. Use `attach` when you want to attach to a running process. +mode | For `launch` requests, one of `auto`, `debug`, `remote`, `test`, or `exec`. For `attach` requests, use `local` or `remote`. +program | In `test` or `debug` mode, this refers to the absolute path to the package or file to debug. In `exec` mode, this is the existing binary file to debug. Not applicable to `attach` requests. +env | Environment variables to use when debugging. Use the format: `{ "NAME": "VALUE" }`. Not applicable to `attach` requests. +envFile | Absolute path to a file containing environment variable definitions. The environment variables passed in via the `env` property override the ones in this file. +args | Array of command-line arguments to pass to the program being debugged. +showLog | If `true` and `logDest` is not set, Delve logs will be printed in the Debug Console panel. If `true` and `logDest` is set, logs will be written to the `logDest` file. This corresponds to `dlv`'s `--log` flag. +logOutput | Comma-separated list of Delve components (`debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`) that should produce debug output when `showLog` is `true`. This corresponds to `dlv`'s `--log-output` flag. +logDest | Absolute path to the delve log output file. This corresponds to `dlv`'s `--log-dest` flag, but number (used for file descriptor) is disallowed. Supported only in dlv-dap mode on Linux and Mac. +buildFlags | Build flags to pass to the Go compiler. This corresponds to `dlv`'s `--build-flags` flag. +dlvFlags | Extra flags passed to `dlv`. See `dlv help` for the full list of supported flags. This is useful when users need to pass less commonly used or new flags such as `--only-same-user`, `--check-go-version`. Note that some flags such as `--log-output`, `--log`, `--log-dest`, `--api-version` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error. +remotePath | If remote debugging (`mode`: `remote`), this should be the absolute path to the package being debugged on the remote machine. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant. Becomes the first mapping in substitutePath. +substitutePath | An array of mappings from an absolute local path to an absolute remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. The mappings are applied in order, and the first matching mapping is used. This can be used to map files that have moved since the program was built, different remote paths, and symlinked files or directories. This is intended to be equivalent to the [substitute-path](https://github.com/go-delve/delve/tree/master/Documentation/cli#config) configuration, and will eventually configure substitute-path in Delve directly. +cwd | The working directory to be used in running the program. If remote debugging (`mode`: `remote`), this should be the absolute path to the working directory being debugged on the local machine. The extension defaults to the workspace folder, or the workspace folder of the open file in multi root workspaces. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant. +processId | This is the process ID of the executable you want to debug. Applicable only when using the `attach` request in `local` mode. By setting this to the command name of the process, `${command:pickProcess}`, or`${command:pickGoProcess}` a quick pick menu will show a list of processes to choose from. + +### Specifying [build tags](https://golang.org/pkg/go/build/#hdr-Build_Constraints) + +If your program contains [build tags](https://golang.org/pkg/go/build/#hdr-Build_Constraints), you can use the `buildFlags` property. For example, if you build your code with: + +```bash +go build -tags=whatever +``` + +Then, set: + +```json5 +"buildFlags": "-tags=whatever" +``` + +in your launch configuration. This property supports multiple tags, which you can set by using single quotes. For example: + +```json5 +"buildFlags": "-tags='first,second,third'" +``` + + + +### Specifying other build flags + +The flags specified in `buildFlags` and `env.GOFLAGS` are passed to the Go compiler when building your program for debugging. Delve adds `-gcflags='all=-N -l'` to the list of build flags to disable optimizations. User specified buildFlags conflict with this setting, so the extension removes them ([Issue #117](https://github.com/golang/vscode-go/issues/117)). If you wish to debug a program using custom `-gcflags`, build the program using `go build` and launch using `exec` mode: + +```json +{ + "name": "Launch executable", + "type": "go", + "request": "launch", + "mode": "exec", + "program": "/absolute/path/to/executable" +} +``` + +Note that it is not recommended to debug optimized executables as Delve may not have the information necessary to properly debug your program. + +### Using [VS Code variables] + +Any property in the launch configuration that requires a file path can be specified in terms of [VS Code variables]. Here are some useful ones to know: + +* `${workspaceFolder}` refers to the root of the workspace opened in VS Code. If using a multi root workspace, you must specify the folder name `${workspaceFolder:folderName}` +* `${fileWorkspaceFolder}` refers to the the current opened file's workspace folder. +* `${file}` refers to the currently opened file. +* `${fileDirname}` refers to the directory containing the currently opened file. This is typically also the name of the Go package containing this file, and as such, can be used to debug the currently opened package. + +### Snippets + +In addition to [VS Code variables], you can make use of [snippets] when editing the launch configuration in `launch.json`. + +When you type `go` in the `launch.json` file, you will see snippet suggestions for debugging the current file or package or a given test function. + +Below are the available sample configurations: + +#### Debug the current file (`Go: Launch file`) + +Recall that `${file}` refers to the currently opened file (see [Using VS Code Variables](#using-vs-code-variables)). For debugging a package that consists with multiple files, use `${fileDirname}` instead. + +```json5 +{ + "name": "Launch file", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${file}" +} +``` + +#### Debug a single test function (`Go: Launch test function`) + +Recall that `${workspaceFolder}` refers to the current workspace (see [Using VS Code Variables](#using-vs-code-variables)). You will need to manually specify the function name instead of `"MyTestFunction"`. + +```json5 +{ + "name": "Launch test function", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}", + "args": [ + "-test.run", + "MyTestFunction" + ] +} +``` + +#### Debug all tests in the given package (`Go: Launch test package`) + +A package is a collection of source files in the same directory that are compiled together. +Recall that `${fileDirname}` refers to the directory of the open file (see [Using VS Code Variables](#using-vs-code-variables)). + +```json5 +{ + "name": "Launch test package", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}" +} +``` + +#### Attach to a running local process via its process ID (`Go: Attach to local process`) + +Substitute `processName` with the name of the local process. + +```json5 +{ + "name": "Attach to local process", + "type": "go", + "request": "attach", + "mode": "local", + "processId": "processName" +} +``` + +#### Attach to a running server (`Go: Connect to Server`) + +```json5 +{ + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" +} +``` + +#### Debug an existing binary + +There is no snippet suggestion for this configuration. + +```json +{ + "name": "Launch executable", + "type": "go", + "request": "launch", + "mode": "exec", + "program": "/absolute/path/to/executable" +} +``` + +If passing arguments to or calling subcommands and flags from a binary, the `args` property can be used. + +```json +{ + "name": "Launch executable", + "type": "go", + "request": "launch", + "mode": "exec", + "program": "/absolute/path/to/executable", + "args": ["subcommand", "arg", "--flag"], +} +``` + +## Debugging on [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) + +If you are using using WSL, you will need the WSL 2 Linux kernel. See [WSL 2 Installation](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install) and note the Window 10 build version requirements. + +## Remote Debugging + + + +To debug on a remote machine, you must first run a headless Delve server on the target machine. The examples below assume that you are in the same folder as the package you want to debug. If not, please refer to the [`dlv debug` documentation](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_debug.md). + +To start the headless Delve server: + +```bash +dlv debug --headless --listen=:2345 --log --api-version=2 +``` + +Any arguments that you want to pass to the program you are debugging must also be passed to this Delve server. For example: + +```bash +dlv debug --headless --listen=:2345 --log -- -myArg=123 +``` + +Then, create a remote debug configuration in your `launch.json`. + +```json5 +{ + "name": "Launch remote", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "/absolute/path/dir/on/remote/machine", + "port": 2345, + "host": "127.0.0.1", + "cwd": "/absolute/path/dir/on/local/machine", +} +``` + +In the example, the VS Code debugger will run on the same machine as the headless `dlv` server. Make sure to update the `port` and `host` settings to point to your remote machine. + +`remotePath` should point to the absolute path of the program being debugged in the remote machine. `cwd` should point to the absolute path of the working directory of the program being debugged on your local machine. This should be the counterpart of the folder in `remotePath`. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for updates regarding `remotePath` and `cwd`. You can also use the equivalent `substitutePath` configuration. + +```json5 +{ + "name": "Launch remote", + "type": "go", + "request": "attach", + "mode": "remote", + "substitutePath": [ + { + "from": "/absolute/path/dir/on/local/machine", + "to": "/absolute/path/dir/on/remote/machine", + }, + ], + "port": 2345, + "host": "127.0.0.1", + "cwd": "/absolute/path/dir/on/local/machine", +} +``` + +If you do not set, `remotePath` or `substitutePath`, then the debug adapter will attempt to infer the path mappings. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for more information. + +When you run the `Launch remote` target, VS Code will send debugging commands to the `dlv` server you started, instead of launching it's own `dlv` instance against your program. + +For further examples, see [this launch configuration for a process running in a Docker host](https://github.com/lukehoban/webapp-go/tree/debugging). + +## Troubleshooting + +Debugging is one of the most complex features offered by this extension. The features are not complete, and a new implementation is currently being developed (see [golang/vscode-go#23](https://github.com/golang/vscode-go/issues/23)). + +The suggestions below are intended to help you troubleshoot any problems you encounter. If you are unable to resolve the issue, please take a look at the [current known debugging issues](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aopen+label%3Adebug) or [file a new issue](https://github.com/golang/vscode-go/issues/new/choose). + +### Read documentation and [common issues](#common-issues) + +Start by taking a quick glance at the [common issues](#common-issues) described below. You can also check the [Delve FAQ](https://github.com/go-delve/delve/blob/master/Documentation/faq.md) in case the problem is mentioned there. + +### Update Delve + +If the problem persists, it's time to start troubleshooting. A good first step is to make sure that you are working with the latest version of Delve. You can do this by running the [`Go: Install/Update Tools`](settings.md#go-installupdate-tools) command and selecting [`dlv`](tools.md#dlv). + +### Check your [launch configuration](#launch-configurations) + +Next, confirm that your [launch configuration](#launch-configurations) is correct. + +One common error is `could not launch process: stat ***/debug.test: no such file or directory`. You may see this while running in the `test` mode. This happens when the `program` attribute points to a folder with no test files, so ensure that the `program` attribute points to a directory containing the test files you wish to debug. + +Also, check the version of the Delve API used in your [launch configuration](#launch-configurations). This is handled by the `–api-version` flag, `2` is the default. If you are debugging on a remote machine, this is particularly important, as the versions on the local and remote machines much match. You can change the API version by editing the [`launch.json` file](#launch-configurations). + +### Check for multiple versions of Delve + +You might have multiple different versions of [`dlv`](tools.md#dlv) installed, and VS Code Go could be using a wrong or old version. Run the [`Go: Locate Configured Go Tools`](settings.md#go-locate-configured-go-tools) command and see where VS Code Go has found `dlv` on your machine. You can try running `which dlv` to see which version of `dlv` you are using on the [command-line](https://github.com/go-delve/delve/tree/master/Documentation/cli). + +To fix the issue, simply delete the version of `dlv` used by the Go extension. Note that the extension first searches for binaries in your `$GOPATH/bin` and then looks on your `$PATH`. + +If you see the error message `Failed to continue: "Error: spawn EACCES"`, the issue is probably multiple versions of `dlv`. + +### Try building your binary **without** compiler optimizations + +If you notice `Unverified breakpoints` or missing variables, ensure that your binary was built **without** compiler optimizations. Try building the binary with `-gcflags="all=-N -l"`. + +### Check your `GOPATH` + +Make sure that the debugger is using the right [`GOPATH`](gopath.md). This is probably the issue if you see `Cannot find package ".." in any of ...` errors. Read more about configuring your [GOPATH](gopath.md) or [file an issue report](https://github.com/golang/vscode-go/issues/new/choose). + +**As a work-around**, add the correct `GOPATH` as an environment variable in the `env` property in the `launch.json` file. + +### Enable logging + +Next, check the logs produced by Delve. These will need to be manually enabled. Follow these steps: + +* Set `"showLog": true` in your launch configuration. This will show Delve logs in the Debug Console pane (Ctrl+Shift+Y). +* Set `"trace": "log"` in your launch configuration. Again, you will see logs in the Debug Console pane (Ctrl+Shift+Y). These logs will also be saved to a file and the path to this file will be printed at the top of the Debug Console. +* Set `"logOutput": "rpc"` in your launch configuration. You will see logs of the RPC messages going between VS Code and Delve. Note that for this to work, you must also have set `"showLog": true`. + * The `logOutput` attribute corresponds to the `--log-output` flag used by Delve. It is a comma-separated list of components that should produce debug output. + +See [common issues](#common-issues) below to decipher error messages you may find in your logs. + +With `"trace": "log"`, you will see the actual call being made to `dlv`. To aid in your investigation, you can copy that and run it in your terminal. + +### **Optional**: Debug the debugger + +This is not a required step, but if you want to continue digging deeper, you can, in fact, debug the debugger. The code for the debugger can be found in the [debug adapter module](../src/debugAdapter). See our [contribution guide](contributing.md) to learn how to [run](contributing.md#run) and [sideload](contributing.md#sideload) the Go extension. + +### Ask for help + +At this point, it's time to look at the [common issues](#common-issues) below or the [existing debugging issues](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aopen+label%3Adebug) on the [issue tracker](https://github.com/golang/vscode-go/issues). If that still doesn't solve your problem, [file a new issue](https://github.com/golang/vscode-go/issues/new/choose). + +## Common Issues + +### delve/launch hangs with no messages on WSL + +Try running ```delve debug ./main``` in the WSL command line and see if you get a prompt. + +**_Solution_**: Ensure you are running the WSL 2 Kernel, which (as of 4/15/2020) requires an early release of the Windows 10 OS. This is available to anyone via the Windows Insider program. See [Debugging on WSL](#debugging-on-windows-subsystem-for-linux-wsl). + +### could not launch process: could not fork/exec + +The solution this issue differs based on your OS. + +#### OSX + +This usually happens on OSX due to signing issues. See the discussions in [Microsoft/vscode-go#717](https://github.com/Microsoft/vscode-go/issues/717), [Microsoft/vscode-go#269](https://github.com/Microsoft/vscode-go/issues/269) and [go-delve/delve#357](https://github.com/go-delve/delve/issues/357). + +**_Solution_**: You may have to uninstall dlv and install it manually as described in the [Delve instructions](https://github.com/go-delve/delve/blob/master/Documentation/installation/osx/install.md#manual-install). + +#### Linux/Docker + +Docker has security settings preventing `ptrace(2)` operations by default within the container. + +**_Solution_**: To run your container insecurely, pass `--security-opt=seccomp:unconfined` to `docker run`. See [go-delve/delve#515](https://github.com/go-delve/delve/issues/515) for references. + +#### could not launch process: exec: "lldb-server": executable file not found in $PATH + +This error can show up for Mac users using Delve versions 0.12.2 and above. `xcode-select --install` has solved the problem for a number of users. + +### Debugging symlink directories + +Since the debugger and go compiler use the actual filenames, extra configuration is required to debug symlinked directories. Use the `substitutePath` property to tell the debugAdapter how to properly translate the paths. For example, if your project lives in `/path/to/actual/helloWorld`, but the project is open in vscode under the linked folder `/path/to/hello`, you can add the following to your config to set breakpoints in the files in `/path/to/hello`: + +```json5 +{ + "name": "Launch remote", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "/path/to/hello", + "substitutePath": [ + { + "from": "/path/to/hello", + "to": "/path/to/actual/helloWorld", + }, + ], +} +``` + +This extension does not provide general support for debugging projects containing symlinks. If `substitutePath` does not meet your needs, please consider commenting on this issue that contains updates to symlink support reference [golang/vscode-go#622](https://github.com/golang/vscode-go/issues/622). + +[Delve]: https://github.com/go-delve/delve +[VS Code variables]: https://code.visualstudio.com/docs/editor/variables-reference +[snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets +[Command Palette]: https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette diff --git a/docs/debugging.md b/docs/debugging.md index d800dfd942..baff27bde5 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -1,459 +1,428 @@ # Debugging -This document explains how to debug your Go programs in VS Code. The Go debugger is [Delve]. You can read more about it in the [Delve documentation](https://github.com/go-delve/delve/tree/master/Documentation). +The Go extension allows you to launch or attach to Go programs for debugging. You can inspect variables and stacks, setting breakpoints, and do other debugging activities using [VS Code’s Debugging UI](https://code.visualstudio.com/docs/editor/debugging). -📣 Integration with the [Delve's native DAP implementation](https://github.com/golang/vscode-go/tree/master/docs/dlv-dap.md) is available for preview. Please give it a try and provide feedback! +These debugging features are possible by using [Delve](https://github.com/go-delve/delve), the Go debugger. +The Go extension has been communicating with Delve through a custom debug adapter program (`legacy` mode). +As the new [`Delve`'s native DAP implementation](https://github.com/go-delve/delve/tree/master/service/dap) becomes available, +the Go extension is transitioning to skip the legacy debug adapter and directly communicate with Delve for local debugging. -## Overview +** 📣 We are happy to announce that now this new mode of Delve integration (_`dlv-dap`_ mode) is enabled for _local_ _debugging_ by default! ** -* [Set up](#set-up) - * [Installation](#installation) - * [Configuration](#configuration) -* [Launch Configurations](#launch-configurations) - * [Specifying build tags](#specifying-build-tags) - * [Specifying other build flags](#specifying-other-build-flags) - * [Using VS Code Variables](#using-vs-code-variables) - * [Snippets](#snippets) -* [Debugging on Windows Subsystem for Linux (WSL)](#debugging-on-windows-subsystem-for-linux-wsl) -* [Remote Debugging](#remote-debugging) -* [Troubleshooting](#troubleshooting) - * [Read documentation and common issues](#read-documentation-and-common-issues) - * [Update Delve](#update-delve) - * [Check for multiple versions of Delve](#check-for-multiple-versions-of-delve) - * [Check your launch configuration](#check-your-launch-configuration) - * [Check your GOPATH](#check-your-gopath) - * [Enable logging](#enable-logging) - * [Optional: Debug the debugger](#optional-debug-the-debugger) - * [Ask for help](#ask-for-help) -* [Common issues](#common-issues) +Delve DAP implementation's support for remote debugging is still a work in progress and the Go extension still uses +the legacy debug adapter for the debug configuration with the `"remote"` mode. -## Set up +Many features and settings described in this document may be available only with the new `dlv-dap` mode. +For troubleshooting and configuring the legacy debug adapter, see [the legacy debug adapter documentation](https://github.com/golang/vscode-go/tree/master/docs/debugging-legacy.md). -[Delve] should be installed by default when you install this extension. +## Getting Started -You may need to update `dlv` to the latest version to support the latest version -of Go—see [Installation](#installation) below. +Open a file to debug (either `package main` source file or the test file) in the editor, and select the `Run and Debug` button from [the Run view](https://code.visualstudio.com/docs/editor/debugging#_run-view). Alternatively, you can start debugging using `Start Debugging (F5)` command from [the Run menu](https://code.visualstudio.com/docs/editor/debugging#_run-menu) or from [the Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (Linux/Windows: Ctrl+Shift+P, Mac: ⇧+⌘+P). -### Installation +When no configuration is configured yet (no `.vscode/launch.json` file), the extension will choose a default configuration based on the file open in the editor. -You can also install Delve manually in one of two ways: +If you already have launch configurations for the project (`.vscode/launch.json`), the Run view will display the configuration list to choose from. -1. Open the [Command Palette][] (Windows/Linux: Ctrl+Shift+P; OSX: Shift+Command+P), select [`Go: Install/Update Tools`](settings.md#go-installupdate-tools), and select [`dlv`](tools.md#dlv). -2. Follow the [Delve installation instructions](https://github.com/go-delve/delve/tree/master/Documentation/installation). +

+Delve DAP Install +
+❗ When you start debugging in `dlv-dap` mode for the first time, the extension will ask to install Delve built from head (`dlv-dap`). Please follow the instructions to install, and then start the debugging session again (i.e. selecting the source file, pressing F5 or click the codelens). +

-### Start debugging +
-1. Open the `package main` source file or the test file you want to debug. -2. Start debugging using one of the following options: - * Open the [Command Palette][], select - `Debug: Start Debugging`, then select `Go`. - * Open the debug window (Windows/Linux: Ctrl+Shift+D; OSX: Shift+Command+D) and click - `Run and Debug`, then select `Go`. - * Select **Run > Start Debugging** from the main menu. +Watch ["Go: Writing and debugging fast, reliable, and efficient software"](https://www.youtube.com/watch?v=6r08zGi38Tk&list=PLj6YeMhvp2S40Q-TEPEKOeypLvTVd5uME&index=1) to learn more about debugging features. - See [the VS Code Debugging documentation](https://code.visualstudio.com/docs/editor/debugging) - for more information. +Please review [the Features section](#features) that provides an overview of the debug UI and available features. +### Staying Up-To-Date -### Configuration +[Delve’s native DAP implementation](https://github.com/go-delve/delve/tree/master/service/dap) is under active development, so take advantage of the most recent features and bug fixes by using Delve built from its master branch. The Go extension maintains this newest version of Delve separately from the officially released version of `dlv` and installs it with the name `dlv-dap`. -You may not need to configure any settings to start debugging your programs, but you should be aware that the debugger looks at the following settings. +The easiest way to update `dlv-dap` on demand is to use the `"Go: Install/Update Tools"` command from the Command Palette (Linux/Windows: Ctrl+Shift+P, Mac: ⇧+⌘+P). The command will show `dlv-dap` in the tool list. Select `dlv-dap`, and the extension will build the tool at master. -* Related to [`GOPATH`](gopath.md): - * [`go.gopath`](settings.md#go.gopath) - * [`go.inferGopath`](settings.md#go.inferGopath) -* [`go.delveConfig`](settings.md#go.delveConfig) - * `apiVersion`: Controls the version of the Delve API used (default: `2`). - * `dlvLoadConfig`: The configuration passed to Delve, which controls how variables are shown in the Debug pane. Not applicable when `apiVersion` is 1. - * `maxStringLen`: Maximum number of bytes read from a string (default: `64`). - * `maxArrayValues`: Maximum number of elements read from an array, slice, or map (default: `64`). - * `maxStructFields`: Maximum number of fields read from a struct. A setting of `-1` indicates that all fields should be read (default: `-1`). - * `maxVariableRecurse`: How far to recurse when evaluating nested types (default: `1`). - * `followPointers`: Automatically dereference pointers (default: `true`). - * `showGlobalVariables`: Show global variables in the Debug view (default: `false`). - * `debugAdapter`: Controls which debug adapter to use (default: `legacy`). - * `substitutePath`: Path mappings to apply to get from a path in the editor to a path in the compiled program (default: `[]`). +Once `dlv-dap` is installed on your system, the extension will prompt you for update whenever installing a newer version is necessary (usually after the Go extension upgrade). You can set the `go.toolsManagement.autoUpdate` setting so the extension can update `dlv-dap` automatically for you. -There are some common cases when you might want to tweak the Delve configurations. +If you need to install `dlv-dap` manually outside of VS Code (for example, you are building a dev container with necessary tools preinstalled), please see the [Manual Installation](#bookmark=id.xuaxofprncd5) section. -* To change the default cap of 64 on string and array length when inspecting variables in the Debug view, set `maxStringLen`. (See a related known issue: [golang/vscode-go#126](https://github.com/golang/vscode-go/issues/126)). -* To evaluate nested variables in the Run view, set `maxVariableRecurse`. +### Switching to legacy debug adapter -## Launch Configurations +If you need to use the legacy debug adapter (`legacy` mode) by default, +add the following in your VSCode settings. -To get started debugging, run the command `Debug: Open launch.json`. If you did not already have a `launch.json` file for your project, this will create one for you. It will contain this default configuration, which can be used to debug the current package. With mode `auto`, the file that is currently open will determine whether to debug the program as a test. If `program` is instead set to a Go file, that file will determine which mode to run in. +Note that the extension still uses the legacy debug adapter for remote debugging. -```json5 -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Launch", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${fileDirname}", - "env": {}, - "args": [] - } - ] -} ``` - -There are some more properties that you can adjust in the debug configuration: - -Property | Description --------- | ----------- -name | The name for your configuration as it appears in the drop-down in the Run view. -type | Always leave this set to `"go"`. VS Code uses this setting to determine which extension should be used for debugging. -request | One of `launch` or `attach`. Use `attach` when you want to attach to a running process. -mode | For `launch` requests, one of `auto`, `debug`, `remote`, `test`, or `exec`. For `attach` requests, use `local` or `remote`. -program | In `test` or `debug` mode, this refers to the absolute path to the package or file to debug. In `exec` mode, this is the existing binary file to debug. Not applicable to `attach` requests. -env | Environment variables to use when debugging. Use the format: `{ "NAME": "VALUE" }`. Not applicable to `attach` requests. -envFile | Absolute path to a file containing environment variable definitions. The environment variables passed in via the `env` property override the ones in this file. -args | Array of command-line arguments to pass to the program being debugged. -showLog | If `true` and `logDest` is not set, Delve logs will be printed in the Debug Console panel. If `true` and `logDest` is set, logs will be written to the `logDest` file. This corresponds to `dlv`'s `--log` flag. -logOutput | Comma-separated list of Delve components (`debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`) that should produce debug output when `showLog` is `true`. This corresponds to `dlv`'s `--log-output` flag. -logDest | Absolute path to the delve log output file. This corresponds to `dlv`'s `--log-dest` flag, but number (used for file descriptor) is disallowed. Supported only in dlv-dap mode on Linux and Mac. -buildFlags | Build flags to pass to the Go compiler. This corresponds to `dlv`'s `--build-flags` flag. -dlvFlags | Extra flags passed to `dlv`. See `dlv help` for the full list of supported flags. This is useful when users need to pass less commonly used or new flags such as `--only-same-user`, `--check-go-version`. Note that some flags such as `--log-output`, `--log`, `--log-dest`, `--api-version` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error. -remotePath | If remote debugging (`mode`: `remote`), this should be the absolute path to the package being debugged on the remote machine. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant. Becomes the first mapping in substitutePath. -substitutePath | An array of mappings from an absolute local path to an absolute remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. The mappings are applied in order, and the first matching mapping is used. This can be used to map files that have moved since the program was built, different remote paths, and symlinked files or directories. This is intended to be equivalent to the [substitute-path](https://github.com/go-delve/delve/tree/master/Documentation/cli#config) configuration, and will eventually configure substitute-path in Delve directly. -cwd | The working directory to be used in running the program. If remote debugging (`mode`: `remote`), this should be the absolute path to the working directory being debugged on the local machine. The extension defaults to the workspace folder, or the workspace folder of the open file in multi root workspaces. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant. -processId | This is the process ID of the executable you want to debug. Applicable only when using the `attach` request in `local` mode. By setting this to the command name of the process, `${command:pickProcess}`, or`${command:pickGoProcess}` a quick pick menu will show a list of processes to choose from. - -### Specifying [build tags](https://golang.org/pkg/go/build/#hdr-Build_Constraints) - -If your program contains [build tags](https://golang.org/pkg/go/build/#hdr-Build_Constraints), you can use the `buildFlags` property. For example, if you build your code with: - -```bash -go build -tags=whatever + "go.delveConfig": { + "debugAdapter": "legacy", + } ``` -Then, set: +If you want to switch to `legacy` for only a subset of your launch configurations, you can use [the `debugAdapter` attribute](#launchjson-attributes) to switch between `"dlv-dap"` and `"legacy"` mode. -```json5 -"buildFlags": "-tags=whatever" -``` +If you chose to switch to legacy because of bugs in the new debug adapter, +please [open an issue](https://github.com/golang/vscode-go/issues/new) +to help us improve the new debug adapter. +## Features -in your launch configuration. This property supports multiple tags, which you can set by using single quotes. For example: +For general debugging features such as inspecting variables, setting breakpoints, and other activities that aren't language-dependent, review [VS Code debugging](https://code.visualstudio.com/docs/editor/debugging). -```json5 -"buildFlags": "-tags='first,second,third'" -``` +### Configure - +When you need more than the default debugging setup, you can create a launch configuration file for the project by clicking the "create a launch.json file" link in [the Run view](https://code.visualstudio.com/docs/editor/debugging#_run-view). Then, choose from the debug configuration drop-down menu. VS Code will create a `launch.json` file in a .vscode folder in your workspace (project root folder) or in your [user settings](https://code.visualstudio.com/docs/editor/debugging#_global-launch-configuration) or [workspace settings](https://code.visualstudio.com/docs/editor/multi-root-workspaces#_workspace-launch-configurations). -### Specifying other build flags +If you already have a `launch.json` for your project, you can open it using `Open launch.json`. -The flags specified in `buildFlags` and `env.GOFLAGS` are passed to the Go compiler when building your program for debugging. Delve adds `-gcflags='all=-N -l'` to the list of build flags to disable optimizations. User specified buildFlags conflict with this setting, so the extension removes them ([Issue #117](https://github.com/golang/vscode-go/issues/117)). If you wish to debug a program using custom `-gcflags`, build the program using `go build` and launch using `exec` mode: +To add a new configuration to an existing `launch.json`, choose the "Add Configuration…" button to invoke the snippet IntelliSense. -```json -{ - "name": "Launch executable", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "/absolute/path/to/executable" -} -``` +

+Create launch.json +

-Note that it is not recommended to debug optimized executables as Delve may not have the information necessary to properly debug your program. +There are many configuration attributes (see [the Launch.json attributes](#launchjson-attributes) section). IntelliSense in VS Code’s launch.json editor will help you navigate available options and documentation. -### Using [VS Code variables] +### Launch -Any property in the launch configuration that requires a file path can be specified in terms of [VS Code variables]. Here are some useful ones to know: +You can choose "Start Debugging (F5)" and "Run Without Debugging (^F5)" a.k.a the `noDebug` mode. This feature uses a `launch` request type configuration. Its `program` attribute needs to be either the go file or folder of the main package or test file. In this mode, the Go extension will start the debug session by building and launching the program. The launched program will be terminated when the debug session ends. -* `${workspaceFolder}` refers to the root of the workspace opened in VS Code. If using a multi root workspace, you must specify the folder name `${workspaceFolder:folderName}` -* `${fileWorkspaceFolder}` refers to the the current opened file's workspace folder. -* `${file}` refers to the currently opened file. -* `${fileDirname}` refers to the directory containing the currently opened file. This is typically also the name of the Go package containing this file, and as such, can be used to debug the currently opened package. +* Supported modes + * `debug`: build and debug a main package + * `test`: build and debug a test + * `exec`: debug a precompiled binary. The binary needs to be built with `-gcflags=all="-N -l"` flags to avoid stripping debugging information. + * `auto`: automatically choose between `debug` and `test` depending on the open file. -### Snippets +### Attach -In addition to [VS Code variables], you can make use of [snippets] when editing the launch configuration in `launch.json`. +You can debug an already running program using the `attach` request type configuration. With the `attach` request, the Go extension starts `dlv-dap` and configures it to attach to the specified process. Users can select the process to debug with one of the following options: -When you type `go` in the `launch.json` file, you will see snippet suggestions for debugging the current file or package or a given test function. -Below are the available sample configurations: +* Specifying the numeric process id (PID) with the `processId` attribute. +* Specifying the target program name in the `processId` attribute. If there are multiple processes matching the specified program name, the extension will show the list of matching processes at the start of the debug session. +* Specifying `0` in the `processId` attribute and selecting the process from the drop-down menu at the start of the debug session. -#### Debug the current file (`Go: Launch file`) +

+Attach to a running process +

-Recall that `${file}` refers to the currently opened file (see [Using VS Code Variables](#using-vs-code-variables)). For debugging a package that consists with multiple files, use `${fileDirname}` instead. +When you end the debug session, the debug UI allows you to choose to either -```json5 -{ - "name": "Launch file", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${file}" -} -``` +* Disconnect: detach and leave the process running. (default) +* Terminate: terminate the attached process. -#### Debug a single test function (`Go: Launch test function`) +

+Terminate Debugging started with Attach +

-Recall that `${workspaceFolder}` refers to the current workspace (see [Using VS Code Variables](#using-vs-code-variables)). You will need to manually specify the function name instead of `"MyTestFunction"`. + -```json5 -{ - "name": "Launch test function", - "type": "go", - "request": "launch", - "mode": "test", - "program": "${workspaceFolder}", - "args": [ - "-test.run", - "MyTestFunction" - ] -} -``` +### Debug Actions -#### Debug all tests in the given package (`Go: Launch test package`) +Once a debug session starts, the Debug toolbar will appear on the top of the editor. -A package is a collection of source files in the same directory that are compiled together. -Recall that `${fileDirname}` refers to the directory of the open file (see [Using VS Code Variables](#using-vs-code-variables)). +

+Debug Tool Bar +

-```json5 -{ - "name": "Launch test package", - "type": "go", - "request": "launch", - "mode": "test", - "program": "${workspaceFolder}" -} -``` +* Continue / Pause F5 +* Step Over (aka `next` in Delve) F10 +* Step Into (aka `step` in Delve) F11 +* Step Out (aka `stepout` in Delve) Shift+F11 or ⇧F11 +* Restart (currently this is "Stop + Start") Ctrl+Shift+F5 or ⇧⌘F5 +* Stop (terminate the debugee. Available in Launch request) Shift+F5 or ⇧F5 +* Disconnect (detach from the debugee. Available only in Attach request) Shift+F5 or ⇧F5 +* Terminate (terminate the debugee. Available only in Attach request) Alt+Shift+F5 or ⌥⇧F5 -#### Attach to a running local process via its process ID (`Go: Attach to local process`) +### Breakpoints -Substitute `processName` with the name of the local process. +See [VS Code’s Debug Documentation on Breakpoints](https://code.visualstudio.com/docs/editor/debugging#_breakpoints) to get familiar with VS Code’s UI. The Go debugger supports multiple ways to configure breakpoints. -```json5 -{ - "name": "Attach to local process", - "type": "go", - "request": "attach", - "mode": "local", - "processId": "processName" -} -``` +* **Breakpoints**: you can set breakpoints by clicking on the editor margin or using F9 on the current line. If the breakpoints can’t be set by Delve, VS Code will show the failure reason and grey out the dot. -#### Attach to a running server (`Go: Connect to Server`) +

+Invalid breakpoint +

-```json5 -{ - "name": "Connect to server", - "type": "go", - "request": "attach", - "mode": "remote", - "remotePath": "${workspaceFolder}", - "port": 2345, - "host": "127.0.0.1" -} -``` +* **Conditional breakpoints**: you can specify breakpoint conditions (similar to Delve’s [`condition` command](https://github.com/go-delve/delve/tree/master/Documentation/cli#condition)). + * Expression condition: takes a boolean expression. + * Hit count: supports comparison operators (`>`, `>=`, `<`, `<=`, `==`, `!=`) with an integer value. `% n` form means we should stop at the breakpoint when the hitcount is a multiple of `n`. -#### Debug an existing binary +

+Conditional Breakpoint +

-There is no snippet suggestion for this configuration. +* **Function Breakpoints**: breakpoints can be set based on function names. Press the + button in the BREAKPOINTS section header and enter the location in the form of `[:]`. This sets the breakpoint in the `line` inside the `function`. The full syntax for `function` is `.(*).` as specified in [Delve’s location spec](https://github.com/go-delve/delve/blob/master/Documentation/cli/locspec.md#location-specifiers). Function breakpoints are shown with a red triangle in the BREAKPOINTS section. -```json -{ - "name": "Launch executable", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "/absolute/path/to/executable" -} -``` +

+Function breakpoint +

-If passing arguments to or calling subcommands and flags from a binary, the `args` property can be used. +* Logpoint (WIP) -```json -{ - "name": "Launch executable", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "/absolute/path/to/executable", - "args": ["subcommand", "arg", "--flag"], -} -``` +### Data Inspection -## Debugging on [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) +You can inspect variables in the VARIABLES section of the Run view or by hovering over their source in the editor. Variable values and expression evaluation are relative to the selected stack frame in the CALL section. -If you are using using WSL, you will need the WSL 2 Linux kernel. See [WSL 2 Installation](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install) and note the Window 10 build version requirements. +By default, the VARIABLES section hides global variables, and shows only local variables and function arguments. However, you can still inspect global variables from the DEBUG CONSOLE panel. If you prefer to have the VARIABLES section show global variables, set the `showGlobalVariables` attribute in the `launch.json` configuration, or set it in the `go.delveConfig` setting. -## Remote Debugging +When you select a variable and right click from the VARIABLES section, the context menu will present shortcuts to features such as: - +* Set Value: you can set/modify simple string, numeric, pointer values. Using composite literals, or memory allocation is not supported. +* Copy Value: this copies the value in clipboard. +* Copy as Expression: this is useful when you need to query from the REPL in the DEBUG CONSOLE panel. +* Add to Watch: this will automatically add the expression to the WATCH section. -To debug on a remote machine, you must first run a headless Delve server on the target machine. The examples below assume that you are in the same folder as the package you want to debug. If not, please refer to the [`dlv debug` documentation](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_debug.md). +Shadowed variables will be marked with `()`. -To start the headless Delve server: +

+Shadowed Variables +

-```bash -dlv debug --headless --listen=:2345 --log --api-version=2 -``` +⚠️ Delve debugger imposes variable loading limits to prevent loading too many variables at once and negatively impacting debugging latency. The `dlv-dap` mode uses a different approach. It takes advantage of the interactive UI features to provide on-demand loading of individual variables, paging of arrays, slices and maps and increased string limits depending on the context. We continue to explore additional interactive features to balance performance and usability of variable loading and look forward to your feedback. -Any arguments that you want to pass to the program you are debugging must also be passed to this Delve server. For example: +You can inspect variables and evaluate expressions from the DEBUG CONSOLE panel too. Acceptable expressions are either -```bash -dlv debug --headless --listen=:2345 --log -- -myArg=123 -``` +* A valid [Delve expression](https://github.com/go-delve/delve/blob/master/Documentation/cli/expr.md), or +* `call ` to call functions. -Then, create a remote debug configuration in your `launch.json`. +

+Debug Console +

-```json5 -{ - "name": "Launch remote", - "type": "go", - "request": "attach", - "mode": "remote", - "remotePath": "/absolute/path/dir/on/remote/machine", - "port": 2345, - "host": "127.0.0.1", - "cwd": "/absolute/path/dir/on/local/machine", -} -``` +Variables and expressions accepted in DEBUG CONSOLE can be also registered in the Run view’s WATCH section, so they can be evaluated automatically as you debug. The "Add to Watch" feature from the VARIABLES section is convenient when you want to register interesting variables. -In the example, the VS Code debugger will run on the same machine as the headless `dlv` server. Make sure to update the `port` and `host` settings to point to your remote machine. +⚠️ Function call feature is highly EXPERIMENTAL due to the limitation in Go runtime. Registering function calls in the WATCH section can often be problematic. Pause, stop, and disconnect will not work while a function call is running. -`remotePath` should point to the absolute path of the program being debugged in the remote machine. `cwd` should point to the absolute path of the working directory of the program being debugged on your local machine. This should be the counterpart of the folder in `remotePath`. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for updates regarding `remotePath` and `cwd`. You can also use the equivalent `substitutePath` configuration. +Hover over variables in editors during debugging shows the value of the variable. For this feature, VS Code extracts the variable expression and makes a request to the debugger to evaluate the expression. Delve evaluates the expression relative to the highlighted stack frame chosen in the CALL STACK. By default, that is the current top-most frame. -```json5 +

Hover over Variable in Source Code +

+ +⚠️ Limitation + +* VS Code heuristically determines the variable expression without full understanding of the scope & the currently selected frame. Delve tries to evaluate the provided expression in the selected frame. As a result, hover over variables outside the selected frame’s function may present incorrect information. + +### Call Stack + +You can inspect all goroutines and their stacks in the CALL STACK section. The CALL STACK section UI allows switching between goroutines or selecting a different stack frame. As a different stack frame or different goroutine is selected, the scope shown in the VARIABLE section will be updated for the newly selected stack frame, and the expressions in the WATCH section will be automatically reevaluated relative to the newly selected stack frame. + +

Call Stack Section Overview

+ +1. Goroutine stacks are annotated with their internal goroutine IDs. +2. The current goroutine is marked with `*`. If multiple goroutines stop (e.g. hit breakpoints) concurrently, Delve will pick one randomly. There also might not be a current goroutine (e.g. deadlock, pause or internal breakpoint hit by a system thread not running a goroutine). +3. If you click a goroutine call stack from the CALL STACK section, the goroutine is _selected_. +4. You can select a frame of the selected goroutine. The VARIABLE and WATCH sections will be updated accordingly and the cursor in the editor will be moved to the corresponding location in the source code. +5. Runtime stack frames are deemphasized (greyed out or collapsed). +6. Thread IDs are shown for scheduled goroutines. +7. Stop reason. It’s possible that there are multiple reasons goroutines were stopped, but currently only one reason is presented. +8. File name and line number of the frame. +9. You can trigger a debug action with the selected goroutine. Note: Resuming or stopping only a single goroutine (Go Issue [25578](https://github.com/golang/go/issues/25578), [31132](https://github.com/golang/go/issues/31132)) is currently not supported, so the action will cause all the goroutines to get activated or paused. +10. Function name of the frame. + +When the program stops due to exception, panic, or bad access error, the CALL STACK shows the stop reason and the editor highlights the source location with more details. + +

Panic

+ +## Configuration + +### Launch.json Attributes + +There are many attributes that you can adjust in the launch and attach debug configuration. The following general attributes are mandatory for all launch configurations. + +* `name`: the name of your configuration as it appears in the drop-down in the Run view. +* `type`: the debugging type VS Code uses to decide which debugging extension should be used. Always leave this set to `"go"`. +* `request`: `launch` or `attach`. + +Here is the list of attributes specific to Go debugging. + + + +| Property | Launch | Attach | +| --- | --- | --- | +| `args` | Command line arguments passed to the debugged program.
|
_n/a_
| +| `backend` | Backend used by delve. Maps to `dlv`'s `--backend` flag.

Allowed Values: `"default"`, `"native"`, `"lldb"`
|

_same as Launch_
| +| `buildFlags` | Build flags, to be passed to the Go compiler. Maps to dlv's `--build-flags` flag.
(Default: `""`)
|
_n/a_
| +| `cwd` | Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The `program` folder is used as the working directory if `cwd` is omitted or empty.
(Default: `""`)
| Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
(Default: `"${workspaceFolder}"`)
| +| `debugAdapter` | Select which debug adapter to use with this launch configuration.

Allowed Values: `"legacy"`, `"dlv-dap"`
(Default: `dlv-dap`)
|

_same as Launch_
| +| `dlvFlags` | Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.
|
_same as Launch_
| +| `env` | Environment variables passed to the program.
|
_n/a_
| +| `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths
(Default: `${workspaceFolder}/.env`)
|
_n/a_
| +| `host` | The host name of the machine the delve debugger will be listening on.
(Default: `"127.0.0.1"`)
|
_same as Launch_
| +| `logDest` | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS.
| dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS.
| +| `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.

Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`
(Default: `"debugger"`)
|

_same as Launch_
| +| `mode` | One of `auto`, `debug`, `test`, `exec`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.

Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`
(Default: `auto`)
| Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.

Allowed Values: `"local"`, `"remote"`
(Default: `local`)
| +| `output` | Output path for the binary of the debugee.
(Default: `"debug"`)
|

_n/a_
| +| `port` | The port that the delve debugger will be listening on.
(Default: `2345`)
|
_same as Launch_
| +| `processId` |
_n/a_
|

Option 1: Use process picker to select a process to attach, or Process ID as integer.

Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`

Option 2: Attach to a process by name. If more than one process matches the name, use the process picker to select a process.

Option 3: The numeric ID of the process to be debugged. If 0, use the process picker to select a process.

(Default: `0`)
| +| `program` | Path to the program folder (or any go file within that folder) when in `debug` or `test` mode, and to the pre-built binary file to debug in `exec` mode. If it is not an absolute path, the extension interpretes it as a workspace relative path.
(Default: `"${workspaceFolder}"`)
|

_n/a_
| +| `remotePath` |
_n/a_
| (Deprecated) *Use `substitutePath` instead.*
The path to the source code on the remote machine, when the remote path is different from the local machine. If specified, becomes the first entry in substitutePath.
(Default: `""`)
| +| `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not.
(Default: `false`)
|
_same as Launch_
| +| `showLog` | Show log output from the delve debugger. Maps to dlv's `--log` flag.
(Default: `false`)
|
_same as Launch_
| +| `stackTraceDepth` | Maximum depth of stack trace collected from Delve.
(Default: `50`)
|
_same as Launch_
| +| `stopOnEntry` | Automatically stop program after launch.
(Default: `false`)
| Automatically stop program after attach.
(Default: `false`)
| +| `substitutePath` | An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath`.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| +| `trace` | Various levels of logging shown in the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`.

Allowed Values: `"verbose"`, `"trace"`, `"log"`, `"info"`, `"warn"`, `"error"`
(Default: `"error"`)
|

_same as Launch_
| + + +⚠️ `dlv-dap` needs file or directory values in the launch configuration to be absolute paths. When configuring those values, use [the VS Code variables substitution](https://code.visualstudio.com/docs/editor/variables-reference) - VS Code will resolve the variables inside strings in `launch.json` before passing the configuration to the Go extension and `dlv-dap`. For example, `${workspaceFolder}` will be replaced with the absolute path to the workspace root folder. When appropriate, the Go extension will resolve relative paths or home directory (~) before sending the configuration to `dlv-dap`. + +### **Debugging symlink directories** + +Since the debugger and go compiler use the actual filenames, extra configuration is required to debug symlinked directories. Use the substitutePath property to tell the `debugAdapter` how to properly translate the paths. For example, if your project lives in `/path/to/actual/helloWorld`, but the project is open in vscode under the linked folder `/path/to/hello`, you can add the following to your config to set breakpoints in the files in `/path/to/hello`: + +``` { "name": "Launch remote", "type": "go", - "request": "attach", - "mode": "remote", + "request": "launch", + "mode": "debug", + "program": "/path/to/actual/helloWorld", "substitutePath": [ { - "from": "/absolute/path/dir/on/local/machine", - "to": "/absolute/path/dir/on/remote/machine", + "from": "/path/to/hello", + "to": "/path/to/actual/helloWorld", }, ], - "port": 2345, - "host": "127.0.0.1", - "cwd": "/absolute/path/dir/on/local/machine", } ``` -If you do not set, `remotePath` or `substitutePath`, then the debug adapter will attempt to infer the path mappings. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for more information. - -When you run the `Launch remote` target, VS Code will send debugging commands to the `dlv` server you started, instead of launching it's own `dlv` instance against your program. + -Debugging is one of the most complex features offered by this extension. The features are not complete, and a new implementation is currently being developed (see [golang/vscode-go#23](https://github.com/golang/vscode-go/issues/23)). +### Settings -The suggestions below are intended to help you troubleshoot any problems you encounter. If you are unable to resolve the issue, please take a look at the [current known debugging issues](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aopen+label%3Adebug) or [file a new issue](https://github.com/golang/vscode-go/issues/new/choose). +You can adjust the default value of the following configuration properties using `go.delveConfig` settings. These default values are useful when you choose to run a debug session without the launch configuration set in `launch.json`. For example, debug sessions started using the `Debug Test` code lenses use the adjusted values from these settings. -### Read documentation and [common issues](#common-issues) +* [`go.delveConfig`](settings.md#go.delveConfig) + * `debugAdapter`: Controls which debug adapter to use (default: `legacy`). Select ‘dlv-dap’. + * `showGlobalVariables`: Show global variables in the Debug view (default: `false`). + * `substitutePath`: Path mappings to apply to get from a path in the editor to a path in the compiled program (default: `[]`). -Start by taking a quick glance at the [common issues](#common-issues) described below. You can also check the [Delve FAQ](https://github.com/go-delve/delve/blob/master/Documentation/faq.md) in case the problem is mentioned there. +⚠️ Where is the `dlvLoadConfig` setting? Delve debugger imposes variable loading limits to avoid loading too many variables at once and negatively impacting debugging latency. The legacy adapter supported `dlvLoadConfig` to adjust these limits for the duration of the session. The user therefore had to come up with a one-size-fits-all limit if the default behavior was not satisfactory. `dlv-dap` mode uses a different approach as described in [the Data Inspection section](#data-inspection). If this setting is configured and `dlv-dap` mode is used, the extension will show a warning prompt now. If the current variable loading behavior and internal limits are not working for you, please open an issue and share your feedback. -### Update Delve +

dlvLoadConfig is invalid

-If the problem persists, it's time to start troubleshooting. A good first step is to make sure that you are working with the latest version of Delve. You can do this by running the [`Go: Install/Update Tools`](settings.md#go-installupdate-tools) command and selecting [`dlv`](tools.md#dlv). +## Advanced Topics -### Check your [launch configuration](#launch-configurations) -Next, confirm that your [launch configuration](#launch-configurations) is correct. +### Go Debug Extension Architecture Overview -One common error is `could not launch process: stat ***/debug.test: no such file or directory`. You may see this while running in the `test` mode. This happens when the `program` attribute points to a folder with no test files, so ensure that the `program` attribute points to a directory containing the test files you wish to debug. +VS Code implements a generic, language-agnostic debugger UI based on [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) (DAP), an abstract protocol for communicating with debugger backend. Previously, the Go extension used an intermediary typescript program (legacy debug adapter) to launch Delve and adapt Delve to DAP. With [the new, native DAP implementation in Delve](https://github.com/go-delve/delve/tree/master/service/dap), the intermediary program is no longer necessary, and efficient and tight integration with Delve becomes possible. -Also, check the version of the Delve API used in your [launch configuration](#launch-configurations). This is handled by the `–api-version` flag, `2` is the default. If you are debugging on a remote machine, this is particularly important, as the versions on the local and remote machines much match. You can change the API version by editing the [`launch.json` file](#launch-configurations). +

vscode-go debug architecture

-### Check for multiple versions of Delve +For information on debugging using the legacy debug adapter, please see the old [Debugging Documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging.md). Note that many new or enhanced features discussed in this document may not be available with the legacy debug adapter. -You might have multiple different versions of [`dlv`](tools.md#dlv) installed, and VS Code Go could be using a wrong or old version. Run the [`Go: Locate Configured Go Tools`](settings.md#go-locate-configured-go-tools) command and see where VS Code Go has found `dlv` on your machine. You can try running `which dlv` to see which version of `dlv` you are using on the [command-line](https://github.com/go-delve/delve/tree/master/Documentation/cli). +### Manually installing `dlv-dap` -To fix the issue, simply delete the version of `dlv` used by the Go extension. Note that the extension first searches for binaries in your `$GOPATH/bin` and then looks on your `$PATH`. +On rare occasions, you may want to install `dlv-dap` by yourself instead of letting the extension handle its installation. -If you see the error message `Failed to continue: "Error: spawn EACCES"`, the issue is probably multiple versions of `dlv`. +First, find where the Go extension finds tools. Like [other tools the extension uses](https://github.com/golang/vscode-go/blob/master/docs/tools.md#tools), the Go extension searches the `dlv-dap` executable from `${GOPATH}/bin`, `${GOBIN}` and `${PATH}` (or `Path` in Windows). So, install `dlv-dap` in the directory. The easiest way to check the tool installation location the Go extension uses is currently by running the `Go: Locate Configured Go Tools` command from the command palette (⇧+⌘+P or Ctrl+Shift+P). -### Try building your binary **without** compiler optimizations +The following commands download the source of Delve from the master branch, build & store as `dlv-dap` in `~/go/bin/` directory assuming the directory is the place you found from the first step. -If you notice `Unverified breakpoints` or missing variables, ensure that your binary was built **without** compiler optimizations. Try building the binary with `-gcflags="all=-N -l"`. +If your Go version is 1.16 or newer: -### Check your `GOPATH` +``` +$ GOBIN=/tmp/ go install github.com/go-delve/delve/cmd/dlv@master +$ mv /tmp/dlv $GOPATH/bin/dlv-dap +``` -Make sure that the debugger is using the right [`GOPATH`](gopath.md). This is probably the issue if you see `Cannot find package ".." in any of ...` errors. Read more about configuring your [GOPATH](gopath.md) or [file an issue report](https://github.com/golang/vscode-go/issues/new/choose). +If your Go version is older than 1.16: -**As a work-around**, add the correct `GOPATH` as an environment variable in the `env` property in the `launch.json` file. +``` +$ cd $(mktemp -d) +$ GO111MODULE=on GOBIN=/tmp/ go get github.com/go-delve/delve/cmd/dlv@master +$ mv /tmp/dlv $GOPATH/bin/dlv-dap +``` -### Enable logging +If you want to explicitly specify the location of the delve binary, use the `go.alternateTools` setting: +```json5 +"go.alternateTools": { + "dlv-dap": "" +} +``` -Next, check the logs produced by Delve. These will need to be manually enabled. Follow these steps: +### Remote Debugging -* Set `"showLog": true` in your launch configuration. This will show Delve logs in the Debug Console pane (Ctrl+Shift+Y). -* Set `"trace": "log"` in your launch configuration. Again, you will see logs in the Debug Console pane (Ctrl+Shift+Y). These logs will also be saved to a file and the path to this file will be printed at the top of the Debug Console. -* Set `"logOutput": "rpc"` in your launch configuration. You will see logs of the RPC messages going between VS Code and Delve. Note that for this to work, you must also have set `"showLog": true`. - * The `logOutput` attribute corresponds to the `--log-output` flag used by Delve. It is a comma-separated list of components that should produce debug output. -See [common issues](#common-issues) below to decipher error messages you may find in your logs. +> If you are able to use the [Remote Development](https://aka.ms/vscode-remote/download/extension) extensions and VS Code’s universal [remote development capabilities](https://code.visualstudio.com/docs/remote/remote-overview), that is the recommended way to debug Go programs remotely. Check out [Getting started](https://code.visualstudio.com/docs/remote/remote-overview#_getting-started) section and [Remote tutorials](https://code.visualstudio.com/docs/remote/remote-overview#_remote-tutorials) to learn more. -With `"trace": "log"`, you will see the actual call being made to `dlv`. To aid in your investigation, you can copy that and run it in your terminal. +🚧 Remote debugging is the debug mode intended to work with a debugger and target running on a different machine or a container. Support for remote debugging using Delve’s native DAP implementation is still a work-in-progress. Please fall back to the `legacy` debug adapter. -### **Optional**: Debug the debugger +### Running Debugee Externally -This is not a required step, but if you want to continue digging deeper, you can, in fact, debug the debugger. The code for the debugger can be found in the [debug adapter module](../src/debugAdapter). See our [contribution guide](contributing.md) to learn how to [run](contributing.md#run) and [sideload](contributing.md#sideload) the Go extension. +Sometimes you’d like to launch the program for debugging outside VS Code (e.g., as a workaround of the missing `console` support), there are currently two options. -### Ask for help +* Compile and run the program from the external terminal and use [the "attach" configuration](#attach). +* Launch the server externally; run `dlv-dap dap --listen=:` from the external terminal, and set the `"debugServer": ` attribute in your launch configuration. -At this point, it's time to look at the [common issues](#common-issues) below or the [existing debugging issues](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aopen+label%3Adebug) on the [issue tracker](https://github.com/golang/vscode-go/issues). If that still doesn't solve your problem, [file a new issue](https://github.com/golang/vscode-go/issues/new/choose) or ask a question on the `#vscode` channel of the [Gophers Slack](https://gophers.slack.com). +## Reporting Issues -## Common Issues +When you are having issues in `dlv-dap` mode, first check if the problems are reproducible after updating `dlv-dap`. It's possible that the problems are already fixed. Follow the instruction for [updating dlv-dap](#updating-dlv-dap)) and [updating extension](https://code.visualstudio.com/docs/editor/extension-gallery#\_extension-autoupdate). -### delve/launch hangs with no messages on WSL +Please report issues in [our issue tracker](https://github.com/golang/vscode-go/issues) with the following information. -Try running ```delve debug ./main``` in the WSL command line and see if you get a prompt. +* `go version` +* `go version -m ` +* VS Code and VS Code Go version (e.g. `code --version`) +* Instructions to reproduce the issue (code snippets, your `launch.json`, screenshot) +* DAP trace (See [the instruction](#collecting-logs)) -**_Solution_**: Ensure you are running the WSL 2 Kernel, which (as of 4/15/2020) requires an early release of the Windows 10 OS. This is available to anyone via the Windows Insider program. See [Debugging on WSL](#debugging-on-windows-subsystem-for-linux-wsl). +### Collecting Logs -### could not launch process: could not fork/exec +```json5 +{ + "name": "Launch file", + "type": "go", + "trace": "verbose", + "showLog": true, + "logOutput": "dap", + ... +} +``` -The solution this issue differs based on your OS. +The `logOutput` and `showLog` attributes in `launch.json` enable Delve-side logging (server-side) and DAP message tracing. The `trace` attribute controls the verbosity of Go extension's side logging (client-side). -#### OSX +The logging will appear in the `Go Debug` output channel (Command Palette -> "View: Toggle Output" -> Select "Go Debug" from the dropdown menu). By nature, debug logs may contain sensitive information. Please review the logs carefully before sharing debug logs. -This usually happens on OSX due to signing issues. See the discussions in [Microsoft/vscode-go#717](https://github.com/Microsoft/vscode-go/issues/717), [Microsoft/vscode-go#269](https://github.com/Microsoft/vscode-go/issues/269) and [go-delve/delve#357](https://github.com/go-delve/delve/issues/357). +## Developing -**_Solution_**: You may have to uninstall dlv and install it manually as described in the [Delve instructions](https://github.com/go-delve/delve/blob/master/Documentation/installation/osx/install.md#manual-install). +### Code location -#### Linux/Docker +The core part of Delve DAP implementation is in the [`service/dap`](https://github.com/go-delve/delve/tree/master/service/dap) package. Follow Delve project's [contribution guideline](https://github.com/go-delve/delve/blob/master/CONTRIBUTING.md#contributing-code) to send PRs. -Docker has security settings preventing `ptrace(2)` operations by default within the container. +Code for integration with the Go extension is mostly in [`src/goDebugFactory.ts`](https://github.com/golang/vscode-go/blob/master/src/goDebugFactory.ts) and tests are in [`test/integration/goDebug.test.ts`](https://github.com/golang/vscode-go/blob/master/test/integration/goDebug.test.ts). Please take a look at VS Code Go project's [contribution guideline](https://github.com/golang/vscode-go/blob/master/docs/contributing.md) to learn about how to prepare a change and send it for review. -**_Solution_**: To run your container insecurely, pass `--security-opt=seccomp:unconfined` to `docker run`. See [go-delve/delve#515](https://github.com/go-delve/delve/issues/515) for references. +### Testing -#### could not launch process: exec: "lldb-server": executable file not found in $PATH +For simple launch cases, build the delve binary, and configure `"go.alternateTools"` setting. -This error can show up for Mac users using Delve versions 0.12.2 and above. `xcode-select --install` has solved the problem for a number of users. +```json5 +"go.alternateTools": { + "dlv-dap": +} +``` -### Debugging symlink directories +

Go Debug output channel

+If you are having issues with seeing logs and/or suspect problems in the extension's integration, you can start the Delve DAP server from a separate terminal and configure the extension to directly connect to it. Please remember to file an issue if you encounter any logging-related issues. -Since the debugger and go compiler use the actual filenames, extra configuration is required to debug symlinked directories. Use the `substitutePath` property to tell the debugAdapter how to properly translate the paths. For example, if your project lives in `/path/to/actual/helloWorld`, but the project is open in vscode under the linked folder `/path/to/hello`, you can add the following to your config to set breakpoints in the files in `/path/to/hello`: +``` +$ dlv-dap dap --listen=:12345 --log --log-output=dap +``` ```json5 { - "name": "Launch remote", + "name": "Launch file", "type": "go", "request": "launch", - "mode": "debug", - "program": "/path/to/hello", - "substitutePath": [ - { - "from": "/path/to/hello", - "to": "/path/to/actual/helloWorld", - }, - ], + "debugAdapter": "dlv-dap", + ... + "debugServer": 12345, } ``` -This extension does not provide general support for debugging projects containing symlinks. If `substitutePath` does not meet your needs, please consider commenting on this issue that contains updates to symlink support reference [golang/vscode-go#622](https://github.com/golang/vscode-go/issues/622). - [Delve]: https://github.com/go-delve/delve [VS Code variables]: https://code.visualstudio.com/docs/editor/variables-reference [snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets diff --git a/docs/dlv-dap.md b/docs/dlv-dap.md index f57d47577b..e2d2667107 100644 --- a/docs/dlv-dap.md +++ b/docs/dlv-dap.md @@ -1,150 +1,4 @@ -# Dlv DAP - Delve's native DAP implementation - -[`Delve`'s native DAP implementation](https://github.com/go-delve/delve/tree/master/service/dap) is now available to be used to debug Go programs. - -_________________ -**🔥 This new adapter is still in active development, so to take advantage of the most recent features and bug fixes, you need to use Delve built from the dev branch. When the extension asks to install/update `dlv-dap`, please follow the instruction and rebuild the tool.** -_________________ - -The Go extension currently maintains this development version of Delve separately from the stable version of `dlv`. This version is installed with the name `dlv-dap`. Please follow the instruction in [Getting Started](#getting-started) to configure the extension and install `dlv-dap`. - -This new debug adapter runs in a separate `go` process, which is spawned by VS Code when you debug Go code. -Please see the [Debug Adapter Protocol (DAP)](https://microsoft.github.io/debug-adapter-protocol/) to learn about how the Debug Adapter acts as an intermediary between VS Code and the debugger ([Delve](https://github.com/go-delve/delve)). - - -## Getting Started - -You can select the default debug adapter to use in all launch configurations and codelenses through the `"debugAdapter"` field in the [`"go.delveConfig"`](settings.md#go.delveConfig) setting. You can choose which debug adapter to use for individual launch configurations with the `"debugAdapter"` field in [your `launch.json` configuration](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#snippets). Most settings will continue to work with in this new `"dlv-dap"` mode except [a few caveats](#features-and-caveats). -If you do not already have a `launch.json`, select `create a launch.json file` from the debug pane and choose an initial Go debug configuration. - -
The debug pane with the option to create launch.json
- -In your launch configuration, set the `"debugAdapter"` field to be `"dlv-dap"`. For example, a launch configuration for a file would look like: - -```json5 -{ - "name": "Launch file", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${fileDirname}", - "debugAdapter": "dlv-dap" -} -``` - -To switch back to the legacy adapter, set `"debugAdapter"` to `"legacy"`. - -When you start debugging using the configuration for the first time, the extension will ask you to install `dlv-dap`. - -
missing tool notification
- -Once `dlv-dap` is installed, the extension will prompt you for update whenever installing a newer version is necessary (usually after the Go extension update). - -### Updating dlv dap -The easiest way is to use the `"Go: Install/Update Tools"` command from the command palette (⇧+⌘+P or Ctrl+Shift+P). The command will show `dlv-dap` in the tool list. Select it, and the extension will build the tool at master. - -If you want to install it manually, `go get` with the following command and rename it to `dlv-dap`. - -``` -$ GO111MODULE=on GOBIN=/tmp/ go get github.com/go-delve/delve/cmd/dlv@master -$ mv /tmp/dlv $GOPATH/bin/dlv-dap -``` - -## Features and Caveats - - -🎉 The new debug adapter offers many improvements and fixes bugs that existed in the old adapter. [Here](https://github.com/golang/vscode-go/issues?q=is%3Aissue+label%3Afixedindlvdaponly) is a partial list of enhancement/fixes available only in the new adapter. - -* User-friendly inlined presentation of variables of all complex types (map, struct, pointer, array, slice, ...) -* Auto-loading of nested variables without extra configuration. (See [delve PR/2455](https://github.com/go-delve/delve/pull/2455#issuecomment-827884652)) -* Fixed handling of maps with compound keys -* Improved CALL STACK presentation -* Fixed automated "Add to Watch" / "Copy as Expression" expressions. -* Support to switch goroutines while stepping. -* Robust `call` evaluation. -* Good test coverage. - - -Most of all, the new adapter is written in Go and integrated in `dlv`. That will make it easier for the Go community to contribute.
-Because it is native, we hope for improvement in speed and reliability. - -⚒️ The following features are still under development. - -* Pause/restart while the debugged program is running does not work yet. -* Setting breakpoints while the debugged program is running does not work yet. -* `SetVariable` does not work yet. -* `dlvLoadConfig` to configure max string/bytes length in [`"go.delveConfig"`](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#configuration) does not work. -* Traditional [remote debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging) is not supported. - -Follow along with [golang/vscode-go#23](https://github.com/golang/vscode-go/issues/23) and the [project dashboard](https://github.com/golang/vscode-go/projects/3) for updates on the implementation. - -## Reporting issues - -The VS Code Go maintainers are reachable via the issue tracker and the #vscode-dev channel in the Gophers Slack.
-Please reach out on Slack with questions, suggestions, or ideas. If you have trouble getting started on an issue, we'd be happy to give pointers and advice. - -When you are having issues in `dlv-dap` mode, first check if the problems are reproducible after updating `dlv-dap`. It's possible that the issues are already fixed. Follow the instruction for [updating dlv-dap](#updating-dlv-dap)) and [updating extension](https://code.visualstudio.com/docs/editor/extension-gallery#_extension-autoupdate). - -Please report issues in [our issue tracker](https://github.com/golang/vscode-go/issues) with the following information. - -* `go version` -* `go version -m ` -* VS Code and VS Code Go version. -* Instruction to reproduce the issue (code snippets, your `launch.json`, screenshot) - -## Developing - -### Code location -The core part of Delve DAP implementation is in the [`service/dap`](https://github.com/go-delve/delve/tree/master/service/dap) package. Follow Delve project's [contribution guideline](https://github.com/go-delve/delve/blob/master/CONTRIBUTING.md#contributing-code) to send PRs. -Code for integration with the Go extension is mostly in [`src/goDebugFactory.ts`](https://github.com/golang/vscode-go/blob/master/src/goDebugFactory.ts) and tests are in [`test/integration/goDebug.test.ts`](https://github.com/golang/vscode-go/blob/master/test/integration/goDebug.test.ts). Please take a look at VS Code Go project's [contribution guideline](https://github.com/golang/vscode-go/blob/master/docs/contributing.md) to learn about how to prepare a change and send it for review. - -### Testing -For simple launch cases, build the delve binary, and configure `"go.alternateTools"` setting. - -```json5 -"go.alternateTools": { - "dlv-dap": -} -``` - -Set `logOutput` and `showLog` attributes in `launch.json` to enable `dlv'-side logging and DAP message tracing. -```json5 -{ - "name": "Launch file", - "type": "go", - "debugAdapter": "dlv-dap", - "showLog": true, - "logOutput": "dap", - ... -} -``` - -Set `trace` attribute to control the verbosity of debug extension's logging. -The logging will appear in the `Go Debug` output channel (Command Palette -> "View: Toggle Output" -> Select "Go Debug" from the dropdown menu). - -```json5 -{ - "name": "Launch file", - "type": "go", - "debugAdapter": "dlv-dap", - "trace": "verbose", - ... -} -``` - -If you are having issues with seeing logs and or suspect problems in extension's integration, you can start Delve DAP server from a separate terminal and configure the extension to directly connect to it. - -``` -$ dlv-dap dap --listen=:12345 --log --log-output=dap -``` - -```json5 -{ - "name": "Launch file", - "type": "go", - "request": "launch", - "debugAdapter": "dlv-dap", - ... - "port": 12345 -} -``` +The new debug adapter integration using Delve's native DAP implementation +is enabled by default for local debugging. See +[Debugging Doc](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) +for more information. diff --git a/docs/images/attach-terminate.gif b/docs/images/attach-terminate.gif new file mode 100644 index 0000000000..8dc4902c4a Binary files /dev/null and b/docs/images/attach-terminate.gif differ diff --git a/docs/images/attach.gif b/docs/images/attach.gif new file mode 100644 index 0000000000..d69cb82d5a Binary files /dev/null and b/docs/images/attach.gif differ diff --git a/docs/images/callstack-section-annotated.gif b/docs/images/callstack-section-annotated.gif new file mode 100644 index 0000000000..408825c8ca Binary files /dev/null and b/docs/images/callstack-section-annotated.gif differ diff --git a/docs/images/conditional-breakpoint.gif b/docs/images/conditional-breakpoint.gif new file mode 100644 index 0000000000..d78a5f491a Binary files /dev/null and b/docs/images/conditional-breakpoint.gif differ diff --git a/docs/images/create-launch-json.gif b/docs/images/create-launch-json.gif new file mode 100644 index 0000000000..5adf939750 Binary files /dev/null and b/docs/images/create-launch-json.gif differ diff --git a/docs/images/debug-console.png b/docs/images/debug-console.png new file mode 100644 index 0000000000..480c829dce Binary files /dev/null and b/docs/images/debug-console.png differ diff --git a/docs/images/debug-output.png b/docs/images/debug-output.png new file mode 100644 index 0000000000..d324eaad62 Binary files /dev/null and b/docs/images/debug-output.png differ diff --git a/docs/images/debug-toolbar.png b/docs/images/debug-toolbar.png new file mode 100644 index 0000000000..7cbf61e28d Binary files /dev/null and b/docs/images/debug-toolbar.png differ diff --git a/docs/images/dlv-load-config-warning.png b/docs/images/dlv-load-config-warning.png new file mode 100644 index 0000000000..efbeaea67d Binary files /dev/null and b/docs/images/dlv-load-config-warning.png differ diff --git a/docs/images/dlvdap-install.gif b/docs/images/dlvdap-install.gif new file mode 100644 index 0000000000..3c9eeb52d7 Binary files /dev/null and b/docs/images/dlvdap-install.gif differ diff --git a/docs/images/function-breakpoint.gif b/docs/images/function-breakpoint.gif new file mode 100644 index 0000000000..2a251276e1 Binary files /dev/null and b/docs/images/function-breakpoint.gif differ diff --git a/docs/images/invalid-breakpoint.png b/docs/images/invalid-breakpoint.png new file mode 100644 index 0000000000..226fe512b2 Binary files /dev/null and b/docs/images/invalid-breakpoint.png differ diff --git a/docs/images/panicinfo.png b/docs/images/panicinfo.png new file mode 100644 index 0000000000..ba16a555ef Binary files /dev/null and b/docs/images/panicinfo.png differ diff --git a/docs/images/remote-debugging.png b/docs/images/remote-debugging.png new file mode 100644 index 0000000000..6377e68d43 Binary files /dev/null and b/docs/images/remote-debugging.png differ diff --git a/docs/images/shadowed-variables.png b/docs/images/shadowed-variables.png new file mode 100644 index 0000000000..f09bfb40e8 Binary files /dev/null and b/docs/images/shadowed-variables.png differ diff --git a/docs/images/variable-hover.png b/docs/images/variable-hover.png new file mode 100644 index 0000000000..208c200420 Binary files /dev/null and b/docs/images/variable-hover.png differ diff --git a/docs/images/variables.png b/docs/images/variables.png new file mode 100644 index 0000000000..f3d6f84c8c Binary files /dev/null and b/docs/images/variables.png differ diff --git a/docs/images/vscode-go-debug-arch.png b/docs/images/vscode-go-debug-arch.png new file mode 100644 index 0000000000..be0a88c708 Binary files /dev/null and b/docs/images/vscode-go-debug-arch.png differ diff --git a/docs/nightly.md b/docs/nightly.md index c6ddde8ef1..fc17dc44af 100644 --- a/docs/nightly.md +++ b/docs/nightly.md @@ -16,7 +16,7 @@ Once you have uninstalled or disabled the standard Go extension, search for [Go ## Feedback -If you use [Go Nightly], please share your feedback or bug reports by [filing an issue]. You can also speak to the maintainers directly in the [#vscode-dev](https://gophers.slack.com/archives/CUWGEKH5Z) channel on the [Gophers Slack]. +If you use [Go Nightly], please share your feedback or bug reports by [filing an issue]. ### Community diff --git a/docs/settings.md b/docs/settings.md index bfbcf57138..2b8d0c04eb 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -143,10 +143,10 @@ Delve settings that applies to all debugging sessions. Debug configuration in th | Properties | Description | | --- | --- | | `apiVersion` | Delve Api Version to use. Default value is 2.
Allowed Options: `1`, `2`
Default: `2` | -| `debugAdapter` | Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses.
Allowed Options: `legacy`, `dlv-dap`
Default: `"legacy"` | +| `debugAdapter` | Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses.
Allowed Options: `legacy`, `dlv-dap`
Default: `"dlv-dap"` | | `dlvLoadConfig` | LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'.
Default: ``` {
"followPointers" :	true,
"maxArrayValues" : 64,
"maxStringLen" : 64,
"maxStructFields" : -1,
"maxVariableRecurse" : 1,
} ``` | | `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not.
Default: `false` | -| `substitutePath` | An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by remotePath. | +| `substitutePath` | An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath` (in attach request). | Default: ``` @@ -382,6 +382,11 @@ Default: "tags" : "", } ``` +### `go.terminal.activateEnvironment` + +Apply the Go & PATH environment variables used by the extension to all integrated terminals. + +Default: `true` ### `go.testEnvFile` Absolute path to a file containing environment variables definitions. File contents should be of the form key=value. @@ -550,6 +555,15 @@ Default: `true` for template files. +Default: `false` +### `build.experimentalUseInvalidMetadata` + +(Experimental) experimentalUseInvalidMetadata enables gopls to fall back on outdated +package metadata to provide editor features if the go command fails to +load packages for some reason (like an invalid go.mod file). This will +eventually be the default behavior, and this setting will be removed. + + Default: `false` ### `build.experimentalWorkspaceModule` @@ -722,9 +736,9 @@ that should be reported by the gc_details command. | `escape` | `"escape"` controls diagnostics about escape choices.

Default: `true` | | `inline` | `"inline"` controls diagnostics about inlining choices.

Default: `true` | | `nil` | `"nil"` controls nil checks.

Default: `true` | -### `ui.diagnostic.experimentalDiagnosticsDelay` +### `ui.diagnostic.diagnosticsDelay` -(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits +(Advanced) diagnosticsDelay controls the amount of time that gopls waits after the most recent file modification before computing deep diagnostics. Simple diagnostics (parsing and type-checking) are always run immediately on recently modified packages. @@ -733,6 +747,18 @@ This option must be set to a valid duration string, for example `"250ms"`. Default: `"250ms"` +### `ui.diagnostic.experimentalWatchedFileDelay` + +(Experimental) experimentalWatchedFileDelay controls the amount of time that gopls waits +for additional workspace/didChangeWatchedFiles notifications to arrive, +before processing all such notifications in a single batch. This is +intended for use by LSP clients that don't support their own batching of +file system notifications. + +This option must be set to a valid duration string, for example `"100ms"`. + + +Default: `"0s"` ### `ui.diagnostic.staticcheck` (Experimental) staticcheck enables additional analyses from staticcheck.io. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 908a158b1b..e28abcbd80 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -69,7 +69,7 @@ We can't diagnose a problem from just a description. When filing an issue, pleas 1. Your Go version: `go version` 1. Your `gopls` version: `gopls -v version` -1. Your vscode version: `code -v` +1. Your vscode version: `code -v` (The minimum required VS Code version is in the ["engines"](https://github.com/golang/vscode-go/blob/master/package.json#L89) attribute in the package.json file.) 1. Your Go extension version: `Extensions: Show Installed Extensions` 1. Your Go environment: `go env` in the workspace folder 1. Relevant VS Code settings: run `Preferences: Open Settings (JSON)` and include anything in a `[go]` block, and anything that starts with `go.` or `gopls.` diff --git a/go.mod b/go.mod index c9b6ca1e1d..7548f3830d 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/golang/vscode-go go 1.16 + +require golang.org/x/build v0.0.0-20210617174213-df58bbac082b diff --git a/go.sum b/go.sum new file mode 100644 index 0000000000..77ee8bf566 --- /dev/null +++ b/go.sum @@ -0,0 +1,632 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +contrib.go.opencensus.io/exporter/prometheus v0.3.0/go.mod h1:rpCPVQKhiyH8oomWgm34ZmgIdZa8OVYO5WAIygPbBBE= +contrib.go.opencensus.io/exporter/stackdriver v0.13.5/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.30.15/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/statsd_exporter v0.20.0/go.mod h1:YL3FWCG8JBBtaUSxAg4Gz2ZYu22bS84XM89ZQXXTWmQ= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go4.org v0.0.0-20180809161055-417644f6feb5 h1:+hE86LblG4AyDgwMCLTE6FOlM9+qjHSYS+rKqxUVdsM= +go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +golang.org/x/build v0.0.0-20210617174213-df58bbac082b h1:Sos3SPeHeY/d7ZzCk6g6ZSVO00M2bOGjbXcj5Flp2VM= +golang.org/x/build v0.0.0-20210617174213-df58bbac082b/go.mod h1:AWukj6xAY8m81WLZfhGiC/BdldwDqBCg5k8orN36R1U= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/package-lock.json b/package-lock.json index 40c90814b0..367326abde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.26.0", + "version": "0.27.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.26.0", + "version": "0.27.0", "license": "MIT", "dependencies": { "deep-equal": "^2.0.2", diff --git a/package.json b/package.json index 165f2b64cc..a768597cae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.26.0", + "version": "0.27.0", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { @@ -464,7 +464,7 @@ "type": "go", "request": "launch", "mode": "auto", - "program": "^\"\\${workspaceFolder}${1:}\"" + "program": "^\"\\${fileDirname}${1:}\"" } }, { @@ -527,23 +527,22 @@ "legacy", "dlv-dap" ], - "description": "Select which debug adapter to use with this launch configuration", - "default": "legacy" + "description": "Select which debug adapter to use with this launch configuration.", + "default": "dlv-dap" }, "program": { "type": "string", - "description": "Path to the program folder (or any file within that folder) when in 'debug' or 'test' mode, and to the pre-built binary file to debug in 'exec' mode.", + "description": "Path to the program folder (or any go file within that folder) when in `debug` or `test` mode, and to the pre-built binary file to debug in `exec` mode. If it is not an absolute path, the extension interpretes it as a workspace relative path.", "default": "${workspaceFolder}" }, "mode": { "enum": [ "auto", "debug", - "remote", "test", "exec" ], - "description": "One of 'auto', 'debug', 'remote', 'test', 'exec'.", + "description": "One of `auto`, `debug`, `test`, `exec`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.", "default": "auto" }, "stopOnEntry": { @@ -566,7 +565,7 @@ }, "cwd": { "type": "string", - "description": "Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The 'program' folder is used as the working directory if it is omitted or empty.", + "description": "Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The `program` folder is used as the working directory if `cwd` is omitted or empty.", "default": "" }, "env": { @@ -581,17 +580,17 @@ "properties": { "from": { "type": "string", - "description": "The absolute local path to be replaced when passing paths to the debugger", + "description": "The absolute local path to be replaced when passing paths to the debugger.", "default": "" }, "to": { "type": "string", - "description": "The absolute remote path to be replaced when passing paths back to the client", + "description": "The absolute remote path to be replaced when passing paths back to the client.", "default": "" } } }, - "description": "An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by remotePath.", + "description": "An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls.", "default": [] }, "buildFlags": { @@ -607,11 +606,6 @@ }, "default": [] }, - "remotePath": { - "type": "string", - "description": "Absolute path to the file being debugged on the remote machine in case of remote debugging. If specified, becomes the first entry in substitutePath.", - "default": "" - }, "port": { "type": "number", "description": "The port that the delve debugger will be listening on.", @@ -633,7 +627,7 @@ "error" ], "default": "error", - "description": "Various levels of the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`." + "description": "Various levels of logging shown in the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`." }, "envFile": { "type": [ @@ -653,11 +647,11 @@ "native", "lldb" ], - "description": "Backend used by delve. Only available in delve version 0.12.2 and above." + "description": "Backend used by delve. Maps to `dlv`'s `--backend` flag." }, "output": { "type": "string", - "description": "Output path for the binary of delve", + "description": "Output path for the binary of the debugee.", "default": "debug" }, "logOutput": { @@ -675,38 +669,38 @@ }, "logDest": { "type": "string", - "description": "dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only on Linux and Mac OS in dlv-dap mode." + "description": "dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS." }, "dlvLoadConfig": { "type": "object", "properties": { "followPointers": { "type": "boolean", - "description": "FollowPointers requests pointers to be automatically dereferenced", + "description": "FollowPointers requests pointers to be automatically dereferenced.", "default": true }, "maxVariableRecurse": { "type": "number", - "description": "MaxVariableRecurse is how far to recurse when evaluating nested types", + "description": "MaxVariableRecurse is how far to recurse when evaluating nested types.", "default": 1 }, "maxStringLen": { "type": "number", - "description": "MaxStringLen is the maximum number of bytes read from a string", + "description": "MaxStringLen is the maximum number of bytes read from a string.", "default": 64 }, "maxArrayValues": { "type": "number", - "description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map", + "description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map.", "default": 64 }, "maxStructFields": { "type": "number", - "description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields", + "description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields.", "default": -1 } }, - "description": "LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'", + "description": "LoadConfig describes to delve, how to load values from target's memory. Not applicable when using `dlv-dap` mode.", "default": { "followPointers": true, "maxVariableRecurse": 1, @@ -721,12 +715,12 @@ 1, 2 ], - "description": "Delve Api Version to use. Default value is 2. Maps to dlv's `--api-version` flag.", + "description": "Delve Api Version to use. Default value is 2. Maps to dlv's `--api-version` flag. Not applicable when using `dlv-dap` mode.", "default": 2 }, "stackTraceDepth": { "type": "number", - "description": "Maximum depth of stack trace collected from Delve", + "description": "Maximum depth of stack trace collected from Delve.", "default": 50 }, "showGlobalVariables": { @@ -744,8 +738,8 @@ "legacy", "dlv-dap" ], - "description": "Select which debug adapter to use with this launch configuration", - "default": "legacy" + "description": "Select which debug adapter to use with this launch configuration.", + "default": "dlv-dap" }, "processId": { "anyOf": [ @@ -754,26 +748,25 @@ "${command:pickProcess}", "${command:pickGoProcess}" ], - "description": "Use process picker to select a process to attach, or Process ID as integer.", - "default": "${command:pickProcess}" + "description": "Use process picker to select a process to attach, or Process ID as integer." }, { "type": "string", - "description": "Attach to a process by name. If more than one process matches the name, use the process picker to select a aprocess.", - "default": "" + "description": "Attach to a process by name. If more than one process matches the name, use the process picker to select a process." }, { "type": "number", - "description": "The ID of the process to be debugged." + "description": "The numeric ID of the process to be debugged. If 0, use the process picker to select a process." } - ] + ], + "default": 0 }, "mode": { "enum": [ "local", "remote" ], - "description": "Indicates local or remote debugging. Local maps to the dlv 'attach' command, remote maps to 'connect'.", + "description": "Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.", "default": "local" }, "stopOnEntry": { @@ -801,7 +794,8 @@ }, "remotePath": { "type": "string", - "description": "If remote debugging, the path to the source code on the remote machine, if different from the local machine. If specified, becomes the first entry in substitutePath.", + "description": "The path to the source code on the remote machine, when the remote path is different from the local machine. If specified, becomes the first entry in substitutePath.", + "markdownDeprecationMessage": "Use `substitutePath` instead.", "default": "" }, "port": { @@ -821,28 +815,31 @@ "properties": { "from": { "type": "string", - "description": "The absolute local path to be replaced when passing paths to the debugger", + "description": "The absolute local path to be replaced when passing paths to the debugger.", "default": "" }, "to": { "type": "string", - "description": "The absolute remote path to be replaced when passing paths back to the client", + "description": "The absolute remote path to be replaced when passing paths back to the client.", "default": "" } } }, - "description": "An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls.", + "description": "An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath`.", "default": [] }, "trace": { "type": "string", "enum": [ - "log", "verbose", + "trace", + "log", + "info", + "warn", "error" ], "default": "error", - "description": "Various levels of logging shown in the debug console. When set to 'log' or 'verbose', the logs will also be written to a file." + "description": "Various levels of logging shown in the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`." }, "backend": { "type": "string", @@ -851,7 +848,7 @@ "native", "lldb" ], - "description": "Backend used by delve. Only available in delve version 0.12.2 and above. Maps to dlv's `--backend` flag." + "description": "Backend used by delve. Maps to `dlv`'s `--backend` flag." }, "logOutput": { "type": "string", @@ -868,7 +865,7 @@ }, "logDest": { "type": "string", - "description": "dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only on Linux and Mac OS in dlv-dap mode." + "description": "dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS." }, "dlvLoadConfig": { "type": "object", @@ -899,7 +896,7 @@ "default": -1 } }, - "description": "LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'.", + "description": "LoadConfig describes to delve, how to load values from target's memory. Not applicable when using `dlv-dap` mode.", "default": { "followPointers": true, "maxVariableRecurse": 1, @@ -914,12 +911,12 @@ 1, 2 ], - "description": "Delve Api Version to use. Default value is 2.", + "description": "Delve Api Version to use. Default value is 2. Not applicable when using `dlv-dap` mode.", "default": 2 }, "stackTraceDepth": { "type": "number", - "description": "Maximum depth of stack trace collected from Delve", + "description": "Maximum depth of stack trace collected from Delve.", "default": 50 }, "showGlobalVariables": { @@ -1739,7 +1736,7 @@ "dlv-dap" ], "description": "Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses.", - "default": "legacy" + "default": "dlv-dap" }, "substitutePath": { "type": "array", @@ -1758,7 +1755,7 @@ } } }, - "description": "An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by remotePath.", + "description": "An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath` (in attach request).", "default": [] } }, @@ -1812,6 +1809,12 @@ }, "additionalProperties": true }, + "go.terminal.activateEnvironment": { + "default": true, + "description": "Apply the Go & PATH environment variables used by the extension to all integrated terminals.", + "scope": "resource", + "type": "boolean" + }, "gopls": { "type": "object", "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.", @@ -1862,6 +1865,12 @@ "default": false, "scope": "resource" }, + "build.experimentalUseInvalidMetadata": { + "type": "boolean", + "markdownDescription": "(Experimental) experimentalUseInvalidMetadata enables gopls to fall back on outdated\npackage metadata to provide editor features if the go command fails to\nload packages for some reason (like an invalid go.mod file). This will\neventually be the default behavior, and this setting will be removed.\n", + "default": false, + "scope": "resource" + }, "build.experimentalWorkspaceModule": { "type": "boolean", "markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n", @@ -2209,12 +2218,18 @@ } } }, - "ui.diagnostic.experimentalDiagnosticsDelay": { + "ui.diagnostic.diagnosticsDelay": { "type": "string", - "markdownDescription": "(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n", + "markdownDescription": "(Advanced) diagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n", "default": "250ms", "scope": "resource" }, + "ui.diagnostic.experimentalWatchedFileDelay": { + "type": "string", + "markdownDescription": "(Experimental) experimentalWatchedFileDelay controls the amount of time that gopls waits\nfor additional workspace/didChangeWatchedFiles notifications to arrive,\nbefore processing all such notifications in a single batch. This is\nintended for use by LSP clients that don't support their own batching of\nfile system notifications.\n\nThis option must be set to a valid duration string, for example `\"100ms\"`.\n", + "default": "0s", + "scope": "resource" + }, "ui.diagnostic.staticcheck": { "type": "boolean", "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n", diff --git a/src/config.ts b/src/config.ts index d8f54ac6d2..56ba585a49 100644 --- a/src/config.ts +++ b/src/config.ts @@ -194,4 +194,5 @@ function getConfig(section: string, uri?: vscode.Uri) { } // True if the extension is running in known cloud-based IDEs. -export const IsInCloudIDE = process.env.CLOUD_SHELL === 'true' || process.env.CODESPACES === 'true'; +export const IsInCloudIDE = + process.env.CLOUD_SHELL === 'true' || process.env.CODESPACES === 'true' || !!process.env.GITPOD_WORKSPACE_ID; diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 1322e028c0..f7d33119cc 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -19,6 +19,7 @@ import * as os from 'os'; import * as path from 'path'; import * as util from 'util'; import { + ContinuedEvent, DebugSession, ErrorDestination, Handles, @@ -639,9 +640,11 @@ export class Delve { if (launchArgs.showLog) { dlvArgs.push('--log=' + launchArgs.showLog.toString()); - } - if (launchArgs.logOutput) { - dlvArgs.push('--log-output=' + launchArgs.logOutput); + // Only add the log output flag if we have already added the log flag. + // Otherwise, delve complains. + if (launchArgs.logOutput) { + dlvArgs.push('--log-output=' + launchArgs.logOutput); + } } if (launchArgs.cwd) { dlvArgs.push('--wd=' + launchArgs.cwd); @@ -1777,6 +1780,8 @@ export class GoDebugSession extends LoggingDebugSession { this.debugState = state; this.handleReenterDebug('step'); }); + // All threads are resumed on a next request + this.sendEvent(new ContinuedEvent(1, true)); this.sendResponse(response); log('NextResponse'); } @@ -1800,6 +1805,8 @@ export class GoDebugSession extends LoggingDebugSession { this.debugState = state; this.handleReenterDebug('step'); }); + // All threads are resumed on a step in request + this.sendEvent(new ContinuedEvent(1, true)); this.sendResponse(response); log('StepInResponse'); } @@ -1823,6 +1830,8 @@ export class GoDebugSession extends LoggingDebugSession { this.debugState = state; this.handleReenterDebug('step'); }); + // All threads are resumed on a step out request + this.sendEvent(new ContinuedEvent(1, true)); this.sendResponse(response); log('StepOutResponse'); } diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index e86819b635..c2da764758 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -18,12 +18,11 @@ import { promptForUpdatingTool, shouldUpdateTool } from './goInstallTools'; -import { isInPreviewMode } from './goLanguageServer'; import { packagePathToGoModPathMap } from './goModules'; import { getTool, getToolAtVersion } from './goTools'; import { pickProcess, pickProcessByName } from './pickProcess'; import { getFromGlobalState, updateGlobalState } from './stateUtils'; -import { getBinPath, getGoVersion, getWorkspaceFolderPath, resolvePath } from './util'; +import { getBinPath, getGoVersion } from './util'; import { parseEnvFiles } from './utils/envUtils'; import { resolveHomeDir } from './utils/pathUtils'; @@ -155,10 +154,14 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr } } if (!debugConfiguration['debugAdapter']) { - // for nightly/dev mode, default to dlv-dap. - // TODO(hyangah): when we switch the stable version's default to 'dlv-dap', adjust this. - debugConfiguration['debugAdapter'] = - isInPreviewMode() && debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy'; + // for local mode, default to dlv-dap. + debugConfiguration['debugAdapter'] = debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy'; + } + if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) { + this.showWarning( + 'ignorePortInDlvDapWarning', + "`port` is ignored with the 'dlv-dap' debugAdapter, which does not yet support remote debugging. Please file an issue if you have a use case that requires port." + ); } if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') { this.showWarning( @@ -205,12 +208,7 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr if (!debugConfiguration.hasOwnProperty('substitutePath') && dlvConfig.hasOwnProperty('substitutePath')) { debugConfiguration['substitutePath'] = dlvConfig['substitutePath']; } - if ( - debugAdapter !== 'dlv-dap' && - debugConfiguration.request === 'attach' && - debugConfiguration.mode === 'remote' && - !debugConfiguration['cwd'] - ) { + if (debugAdapter !== 'dlv-dap' && debugConfiguration.request === 'attach' && !debugConfiguration['cwd']) { debugConfiguration['cwd'] = '${workspaceFolder}'; if (vscode.workspace.workspaceFolders?.length > 1) { debugConfiguration['cwd'] = '${fileWorkspaceFolder}'; @@ -277,11 +275,6 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr dlvDAPVersionCurrent = true; } - if (debugAdapter === 'dlv-dap' && debugConfiguration['cwd']) { - // dlv dap expects 'wd' not 'cwd' - debugConfiguration['wd'] = debugConfiguration['cwd']; - } - if (debugConfiguration['mode'] === 'auto') { let filename = activeEditor?.document?.fileName; if (debugConfiguration['program'] && debugConfiguration['program'].endsWith('.go')) { diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index a247e30286..a01cf9eb99 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -38,9 +38,6 @@ export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr private async createDebugAdapterDescriptorDlvDap( configuration: vscode.DebugConfiguration ): Promise> { - if (configuration.port) { - return new vscode.DebugAdapterServer(configuration.port, configuration.host ?? '127.0.0.1'); - } const logger = new TimestampedLogger(configuration.trace, this.outputChannel); const d = new DelveDAPOutputAdapter(configuration, logger); return new vscode.DebugAdapterInlineImplementation(d); @@ -355,7 +352,7 @@ function spawnDlvDapServerProcess( `Couldn't find dlv-dap at the Go tools path, ${process.env['GOPATH']}${ env['GOPATH'] ? ', ' + env['GOPATH'] : '' } or ${envPath}\n` + - 'Follow the setup instruction in https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started.\n' + 'Follow the setup instruction in https://github.com/golang/vscode-go/blob/master/docs/debugging.md#getting-started.\n' ); throw new Error('Cannot find Delve debugger (dlv dap)'); } @@ -379,9 +376,11 @@ function spawnDlvDapServerProcess( dlvArgs.push(`--listen=${host}:${port}`); if (launchAttachArgs.showLog) { dlvArgs.push('--log=' + launchAttachArgs.showLog.toString()); - } - if (launchAttachArgs.logOutput) { - dlvArgs.push('--log-output=' + launchAttachArgs.logOutput); + // Only add the log output flag if we have already added the log flag. + // Otherwise, delve complains. + if (launchAttachArgs.logOutput) { + dlvArgs.push('--log-output=' + launchAttachArgs.logOutput); + } } const onWindows = process.platform === 'win32'; diff --git a/src/goEnvironmentStatus.ts b/src/goEnvironmentStatus.ts index 2262aa6b88..5958329422 100644 --- a/src/goEnvironmentStatus.ts +++ b/src/goEnvironmentStatus.ts @@ -323,6 +323,10 @@ export function addGoRuntimeBaseToPATH(newGoRuntimeBase: string) { if (!newGoRuntimeBase) { return; } + const goCfg = getGoConfig(); + if (!goCfg.get('terminal.activateEnvironment')) { + return; + } const pathEnvVar = pathEnvVarName(); if (!pathEnvVar) { logVerbose("couldn't find PATH property in process.env"); diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index a94aff9c43..6316b5193b 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -162,7 +162,6 @@ export async function installTools( const toInstall: Promise<{ tool: Tool; reason: string }>[] = []; for (const tool of missing) { const modulesOffForTool = modulesOff; - const reason = installTool(tool, goVersion, envForTools, !modulesOffForTool); toInstall.push(Promise.resolve({ tool, reason: await reason })); } @@ -363,9 +362,10 @@ export async function promptForMissingTool(toolName: string) { let msg = `The "${tool.name}" command is not available. Run "go get -v ${getImportPath(tool, goVersion)}" to install.`; if (tool.name === 'dlv-dap') { - msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) command is not available. -Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap).`; + msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) command is not available. +Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#updating-dlv-dap).`; } + const selected = await vscode.window.showErrorMessage(msg, ...installOptions); switch (selected) { case 'Install': @@ -592,9 +592,10 @@ let suggestedDownloadGo = false; async function suggestDownloadGo() { const msg = - `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}).` + + `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}). ` + 'Check PATH, or Install Go and reload the window. ' + "If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971"; + if (suggestedDownloadGo) { vscode.window.showErrorMessage(msg); return; @@ -618,7 +619,9 @@ export async function latestToolVersion(tool: Tool, includePrerelease?: boolean) const goCmd = getBinPath('go'); const tmpDir = await tmpDirForToolInstallation(); const execFile = util.promisify(cp.execFile); + let ret: semver.SemVer | null = null; + try { const env = toolInstallationEnvironment(); env['GO111MODULE'] = 'on'; @@ -691,10 +694,12 @@ export async function shouldUpdateTool(tool: Tool, toolPath: string): Promise { - const toolPath = getBinPath(tool.name); - // TODO(hyangah): print alternate tool info if set. - let msg = 'not installed'; - if (path.isAbsolute(toolPath)) { - // getBinPath returns the absolute path is the tool exists. - // (See getBinPathWithPreferredGopath which is called underneath) - msg = 'installed'; - } - outputChannel.appendLine(` ${tool.name}: ${toolPath} ${msg}`); + const goVersionTooOld = goVersion?.lt('1.12') || false; + + outputChannel.appendLine(`\tgo:\t${goVersion?.binaryPath}: ${goVersion?.version}`); + const toolsInfo = await Promise.all( + allTools.map(async (tool) => { + const toolPath = getBinPath(tool.name); + // TODO(hyangah): print alternate tool info if set. + if (!path.isAbsolute(toolPath)) { + // getBinPath returns the absolute path is the tool exists. + // (See getBinPathWithPreferredGopath which is called underneath) + return `\t${tool.name}:\tnot installed`; + } + if (goVersionTooOld) { + return `\t${tool.name}:\t${toolPath}: unknown version`; + } + try { + const out = await runGoVersionM(toolPath); + return `\t${tool.name}:${out.replace(/^/gm, '\t')}`; + } catch (e) { + return `\t${tool.name}:\t${toolPath}: go version -m failed: ${e}`; + } + }) + ); + toolsInfo.forEach((info) => { + outputChannel.appendLine(info); }); let folders = vscode.workspace.workspaceFolders?.map((folder) => { diff --git a/src/goTest.ts b/src/goTest.ts index bbf95c85ae..325c08c25b 100644 --- a/src/goTest.ts +++ b/src/goTest.ts @@ -175,12 +175,22 @@ export async function subTestAtCursor(goConfig: vscode.WorkspaceConfiguration, a } } + let subtest: string; if (!simpleMatch) { - vscode.window.showInformationMessage('No subtest function with a simple subtest name found at cursor.'); - return; + const input = await vscode.window.showInputBox({ + prompt: 'Enter sub test name' + }); + if (input) { + subtest = input; + } else { + vscode.window.showInformationMessage('No subtest function with a simple subtest name found at cursor.'); + return; + } + } else { + subtest = simpleMatch[1]; } - const subTestName = testFunctionName + '/' + simpleMatch[1]; + const subTestName = testFunctionName + '/' + subtest; return await runTestAtCursor(editor, subTestName, testFunctions, goConfig, 'test', args); } catch (err) { diff --git a/src/goToolsInformation.ts b/src/goToolsInformation.ts index 9f9fd76fa3..04afe9ff93 100644 --- a/src/goToolsInformation.ts +++ b/src/goToolsInformation.ts @@ -202,10 +202,10 @@ export const allToolsInformation: { [key: string]: Tool } = { description: 'Language Server from Google', usePrereleaseInPreviewMode: true, minimumGoVersion: semver.coerce('1.12'), - latestVersion: semver.parse('v0.7.0'), - latestVersionTimestamp: moment('2021-06-08', 'YYYY-MM-DD'), - latestPrereleaseVersion: semver.parse('v0.7.0'), - latestPrereleaseVersionTimestamp: moment('2021-06-08', 'YYYY-MM-DD') + latestVersion: semver.parse('v0.7.1'), + latestVersionTimestamp: moment('2021-08-02', 'YYYY-MM-DD'), + latestPrereleaseVersion: semver.parse('v0.7.1'), + latestPrereleaseVersionTimestamp: moment('2021-08-02', 'YYYY-MM-DD') }, 'dlv': { name: 'dlv', @@ -213,19 +213,20 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/go-delve/delve', replacedByGopls: false, isImportant: true, - description: 'Go debugger (Delve)' + description: 'Go debugger (Delve)', + minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build }, 'dlv-dap': { name: 'dlv-dap', importPath: 'github.com/go-delve/delve/cmd/dlv', modulePath: 'github.com/go-delve/delve', replacedByGopls: false, - isImportant: false, - description: 'Go debugger (Delve built for DAP experiment)', - defaultVersion: 'master', // Always build from the master. - minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy - latestVersion: semver.parse('v1.6.2-0.20210611174649-688f94a4f838'), - latestVersionTimestamp: moment('2021-06-11', 'YYYY-MM-DD') + isImportant: true, + description: 'Go debugger & debug adapter (Delve DAP)', + defaultVersion: 'v1.7.1-0.20210804080032-f95340ae1bf9', // pinned version + minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build + latestVersion: semver.parse('v1.7.1-0.20210804080032-f95340ae1bf9'), + latestVersionTimestamp: moment('2021-08-04', 'YYYY-MM-DD') }, 'fillstruct': { name: 'fillstruct', diff --git a/src/util.ts b/src/util.ts index b68f378340..28270cf36d 100644 --- a/src/util.ts +++ b/src/util.ts @@ -390,6 +390,20 @@ export async function getGoEnv(cwd?: string): Promise { return stdout; } +/** + * Returns the output of `go version -m` with the toolPath. + */ +export async function runGoVersionM(toolPath: string): Promise { + const goRuntime = getBinPath('go'); + const execFile = util.promisify(cp.execFile); + const opts = { env: toolExecutionEnvironment() }; + const { stdout, stderr } = await execFile(goRuntime, ['version', '-m', toolPath], opts); + if (stderr) { + throw new Error(`failed to run 'go version -m ${toolPath}': ${stderr}`); + } + return stdout; +} + /** * Returns boolean denoting if current version of Go supports vendoring */ diff --git a/src/welcome.ts b/src/welcome.ts index cd263787c6..4f671153d7 100644 --- a/src/welcome.ts +++ b/src/welcome.ts @@ -108,6 +108,7 @@ export class WelcomePanel { // Local path to css styles and images const scriptPathOnDisk = joinPath(this.dataroot, 'welcome.js'); const stylePath = joinPath(this.dataroot, 'welcome.css'); + const announcePath = vscode.Uri.joinPath(this.dataroot, 'announce.png'); const gopherPath = joinPath(this.dataroot, 'go-logo-blue.png'); const goExtension = vscode.extensions.getExtension(extensionId)!; const goExtensionVersion = goExtension.packageJSON.version; @@ -116,6 +117,7 @@ export class WelcomePanel { const scriptURI = webview.asWebviewUri(scriptPathOnDisk); const stylesURI = webview.asWebviewUri(stylePath); const gopherURI = webview.asWebviewUri(gopherPath); + const announceURI = webview.asWebviewUri(announcePath); // Use a nonce to only allow specific scripts to be run const nonce = getNonce(); @@ -147,11 +149,24 @@ export class WelcomePanel { -->
  • Release notes
  • GitHub
  • +
  • Questions
  • Slack
  • +
    + announce +

    + Heads up! + The extension now uses Delve's native DAP implementation (dlv-dap) + for local debugging. We updated the + Documentation for Debugging to show the new features available with dlv-dap. + This change does not apply to remote debugging yet. For remote debugging, keep following + the instruction in the old documentation. +

    +
    +
    diff --git a/test/integration/codelens.test.ts b/test/integration/codelens.test.ts index bbe2f61090..7d522d33ae 100644 --- a/test/integration/codelens.test.ts +++ b/test/integration/codelens.test.ts @@ -85,10 +85,19 @@ suite('Code lenses for testing and benchmarking', function () { test('Subtests - does nothing for a dynamically defined subtest', async () => { const editor = await vscode.window.showTextDocument(document); editor.selection = new vscode.Selection(17, 4, 17, 4); + sinon.stub(vscode.window, 'showInputBox').onFirstCall().resolves(undefined); const result = await subTestAtCursor(goConfig, []); assert.equal(result, undefined); }); + test('Subtests - runs a test with curson on t.Run line and dynamic test name is passed in input box', async () => { + const editor = await vscode.window.showTextDocument(document); + editor.selection = new vscode.Selection(17, 4, 17, 4); + sinon.stub(vscode.window, 'showInputBox').onFirstCall().resolves('dynamic test name'); + const result = await subTestAtCursor(goConfig, []); + assert.equal(result, false); + }); + test('Subtests - does nothing when cursor outside of a test function', async () => { const editor = await vscode.window.showTextDocument(document); editor.selection = new vscode.Selection(5, 0, 5, 0); diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts index c73afd93cb..9328784942 100644 --- a/test/integration/goDebug.test.ts +++ b/test/integration/goDebug.test.ts @@ -503,11 +503,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { }); }); - test("should produce error for invalid 'pathFormat'", async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // not working in dlv-dap. - } - + test("should produce error for invalid 'pathFormat'", async () => { const config = { name: 'Launch', type: 'go', request: 'launch', program: DATA_ROOT }; await initializeDebugConfig(config); try { @@ -607,9 +603,9 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { await Promise.all([dc.configurationSequence(), dc.launch(debugConfig), dc.waitForEvent('terminated')]); }); - test('invalid flags are passed to dlv but should be caught by dlv', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // not working in dlv-dap. + test('invalid flags are passed to dlv but should be caught by dlv (legacy)', async function () { + if (isDlvDap) { + this.skip(); } const PROGRAM = path.join(DATA_ROOT, 'baseTest'); @@ -635,6 +631,45 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { ]); }); + test('invalid flags are passed to dlv but should be caught by dlv', async function () { + if (!isDlvDap) { + this.skip(); // not working in dlv-dap. + } + + const PROGRAM = path.join(DATA_ROOT, 'baseTest'); + const config = { + name: 'Launch', + type: 'go', + request: 'launch', + mode: 'debug', + program: PROGRAM, + dlvFlags: ['--invalid'] + }; + try { + await initializeDebugConfig(config); + await dc.initializeRequest(); + } catch (err) { + return; + } + throw new Error('does not report error on invalid delve flag'); + }); + + test('should run program with showLog=false and logOutput specified', async () => { + const PROGRAM = path.join(DATA_ROOT, 'baseTest'); + + const config = { + name: 'Launch', + type: 'go', + request: 'launch', + mode: 'debug', + program: PROGRAM, + showLog: false, + logOutput: 'dap' + }; + const debugConfig = await initializeDebugConfig(config, true); + await Promise.all([dc.configurationSequence(), dc.launch(debugConfig), dc.waitForEvent('terminated')]); + }); + test('should handle threads request after initialization', async () => { const PROGRAM = path.join(DATA_ROOT, 'baseTest'); @@ -676,11 +711,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { assert.ok(response.success); }); - test('user-specified --listen flag should be ignored', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // not working in dlv-dap. - } - + test('user-specified --listen flag should be ignored', async () => { const PROGRAM = path.join(DATA_ROOT, 'baseTest'); const config = { name: 'Launch', @@ -1016,8 +1047,8 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { await new Promise((resolve) => setTimeout(resolve, 2_000)); }); - test('should set breakpoints during continue', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { + test('should set breakpoints during continue (legacy)', async function () { + if (isDlvDap) { this.skip(); // not working in dlv-dap. } @@ -1047,6 +1078,82 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { ]); }); + async function setBreakpointsWhileRunning(resumeFunc: () => void) { + const PROGRAM = path.join(DATA_ROOT, 'sleep'); + + const FILE = path.join(DATA_ROOT, 'sleep', 'sleep.go'); + const SLEEP_LINE = 11; + const setupBreakpoint = getBreakpointLocation(FILE, SLEEP_LINE); + + const HELLO_LINE = 10; + const resumeBreakpoint = getBreakpointLocation(FILE, HELLO_LINE); + + const config = { + name: 'Launch file', + type: 'go', + request: 'launch', + mode: 'debug', + program: PROGRAM + }; + const debugConfig = await initializeDebugConfig(config); + await dc.hitBreakpoint(debugConfig, setupBreakpoint); + + // The program is now stopped at the line containing time.Sleep(). + // Issue a next request, followed by a setBreakpointsRequest. + resumeFunc(); + + // Note: the current behavior of setting a breakpoint during a next + // request will cause the step to be interrupted, so it may not be + // stopped on the next line. + await Promise.all([ + dc.setBreakpointsRequest({ + lines: [resumeBreakpoint.line], + breakpoints: [{ line: resumeBreakpoint.line, column: 0 }], + source: { path: resumeBreakpoint.path } + }), + dc.assertStoppedLocation('pause', {}) + ]); + + // Once the 'step' has completed, continue the program and + // make sure the breakpoint set while the program was nexting + // is succesfully hit. + await Promise.all([ + dc.continueRequest({ threadId: 1 }), + dc.assertStoppedLocation('breakpoint', resumeBreakpoint) + ]); + } + + test('should set breakpoints during continue', async function () { + if (!isDlvDap) { + this.skip(); + } + await setBreakpointsWhileRunning(async () => { + const nextResponse = await dc.continueRequest({ threadId: 1 }); + assert.ok(nextResponse.success); + }); + }); + + test('should set breakpoints during next', async function () { + if (!isDlvDap) { + this.skip(); + } + await setBreakpointsWhileRunning(async () => { + const nextResponse = await dc.nextRequest({ threadId: 1 }); + assert.ok(nextResponse.success); + }); + }); + + test('should set breakpoints during step out', async function () { + if (!isDlvDap) { + this.skip(); + } + + await setBreakpointsWhileRunning(async () => { + const stepOutResponse = await dc.stepOutRequest({ threadId: 1 }); + assert.ok(stepOutResponse.success); + }); + }); + async function setBreakpointsDuringStep(nextFunc: () => void) { const PROGRAM = path.join(DATA_ROOT, 'sleep'); @@ -1092,9 +1199,9 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { ]); } - test('should set breakpoints during next', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // Skipped due to github.com/golang/vscode-go/issues/1390 + test('should set breakpoints during next (legacy)', async function () { + if (isDlvDap) { + this.skip(); } await setBreakpointsDuringStep(async () => { const nextResponse = await dc.nextRequest({ threadId: 1 }); @@ -1102,9 +1209,9 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { }); }); - test('should set breakpoints during step out', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // Skipped due to github.com/golang/vscode-go/issues/1390 + test('should set breakpoints during step out (legacy)', async function () { + if (isDlvDap) { + this.skip(); } await setBreakpointsDuringStep(async () => { @@ -1873,11 +1980,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { return { program: wd, output }; } - test('should stop on a breakpoint set in file with substituted path', async function () { - if (isDlvDap && dlvDapSkipsEnabled) { - this.skip(); // not working in dlv-dap. - } - + test('should stop on a breakpoint set in file with substituted path', async () => { const { program, output } = await copyBuildDelete('baseTest'); const FILE = path.join(DATA_ROOT, 'baseTest', 'test.go'); const BREAKPOINT_LINE = 11; @@ -1981,13 +2084,15 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { }); let testNumber = 0; - async function initializeDebugConfig(config: DebugConfiguration) { + async function initializeDebugConfig(config: DebugConfiguration, keepUserLog?: boolean) { if (isDlvDap) { config['debugAdapter'] = 'dlv-dap'; - // Log the output for easier test debugging. - config['logOutput'] = 'dap,debugger'; - config['showLog'] = true; - config['trace'] = 'verbose'; + if (!keepUserLog) { + // Log the output for easier test debugging. + config['logOutput'] = 'dap,debugger'; + config['showLog'] = true; + config['trace'] = 'verbose'; + } } else { config['debugAdapter'] = 'legacy'; // be explicit and prevent resolveDebugConfiguration from picking diff --git a/test/integration/goDebugConfiguration.test.ts b/test/integration/goDebugConfiguration.test.ts index 508c0d4e6a..c2d98feaf3 100644 --- a/test/integration/goDebugConfiguration.test.ts +++ b/test/integration/goDebugConfiguration.test.ts @@ -575,7 +575,7 @@ suite('Debug Configuration Auto Mode', () => { suite('Debug Configuration Default DebugAdapter', () => { const debugConfigProvider = new GoDebugConfigurationProvider(); - test(`default debugAdapter when isInPreviewMode=${isInPreviewMode()} should be 'dlv-dap'`, () => { + test("default debugAdapter should be 'dlv-dap'", () => { const config = { name: 'Launch', type: 'go', @@ -586,8 +586,7 @@ suite('Debug Configuration Default DebugAdapter', () => { debugConfigProvider.resolveDebugConfiguration(undefined, config); const resolvedConfig = config as any; - const want = isInPreviewMode() ? 'dlv-dap' : 'legacy'; - assert.strictEqual(resolvedConfig['debugAdapter'], want); + assert.strictEqual(resolvedConfig['debugAdapter'], 'dlv-dap'); }); test("default debugAdapter for remote mode should be always 'legacy'", () => { diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index c4875f57e7..00eaef336a 100644 --- a/test/integration/install.test.ts +++ b/test/integration/install.test.ts @@ -160,7 +160,7 @@ suite('Installation Tests', function () { { name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' }, { name: 'dlv-dap', - versions: ['v1.0.0', 'master'], + versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!], wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() } ], @@ -175,7 +175,7 @@ suite('Installation Tests', function () { { name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' }, { name: 'dlv-dap', - versions: ['v1.0.0', 'master'], + versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!], wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() } ], diff --git a/tools/allTools.ts.in b/tools/allTools.ts.in index 33d46b7d4d..ee85474abf 100644 --- a/tools/allTools.ts.in +++ b/tools/allTools.ts.in @@ -211,17 +211,18 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/go-delve/delve', replacedByGopls: false, isImportant: true, - description: 'Go debugger (Delve)' + description: 'Go debugger (Delve)', + minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build }, 'dlv-dap': { name: 'dlv-dap', importPath: 'github.com/go-delve/delve/cmd/dlv', modulePath: 'github.com/go-delve/delve', replacedByGopls: false, - isImportant: false, - description: 'Go debugger (Delve built for DAP experiment)', - defaultVersion: 'master', // Always build from the master. - minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy + isImportant: true, + description: 'Go debugger & debug adapter (Delve DAP)', + defaultVersion: '%s', // pinned version + minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build latestVersion: semver.parse('%s'), latestVersionTimestamp: moment('%s', 'YYYY-MM-DD') }, diff --git a/tools/generate.go b/tools/generate.go index 87e93790b2..a3f64f722f 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -17,6 +17,7 @@ import ( "encoding/json" "flag" "fmt" + "io" "io/ioutil" "log" "os" @@ -36,12 +37,34 @@ var ( debugFlag = flag.Bool("debug", false, "If true, enable extra logging and skip deletion of intermediate files.") ) +func checkAndWrite(filename string, oldContent, newContent []byte) { + // Return early if the contents are unchanged. + if bytes.Equal(oldContent, newContent) { + return + } + + // Either write out new contents or report an error (if in CI). + if *writeFlag { + if err := ioutil.WriteFile(filename, newContent, 0644); err != nil { + log.Fatal(err) + } + fmt.Printf("updated %s\n", filename) + } else { + base := filepath.Join("docs", filepath.Base(filename)) + fmt.Printf(`%s have changed in the package.json, but documentation in %s was not updated. +To update the settings, run "go run tools/generate.go -w". +`, strings.TrimSuffix(base, ".md"), base) + os.Exit(1) // causes CI to break. + } +} + type PackageJSON struct { Contributes struct { Commands []Command `json:"commands,omitempty"` Configuration struct { - Properties map[string]Property `json:"properties,omitempty"` + Properties map[string]*Property `json:"properties,omitempty"` } `json:"configuration,omitempty"` + Debuggers []Debugger `json:"debuggers,omitempty"` } `json:"contributes,omitempty"` } @@ -55,16 +78,31 @@ type Property struct { name string `json:"name,omitempty"` // Set by us. // Below are defined in package.json - Properties map[string]interface{} `json:"properties,omitempty"` - Default interface{} `json:"default,omitempty"` - MarkdownDescription string `json:"markdownDescription,omitempty"` - Description string `json:"description,omitempty"` - MarkdownDeprecationMessage string `json:"markdownDeprecationMessage,omitempty"` - DeprecationMessage string `json:"deprecationMessage,omitempty"` - Type interface{} `json:"type,omitempty"` - Enum []interface{} `json:"enum,omitempty"` - EnumDescriptions []string `json:"enumDescriptions,omitempty"` - MarkdownEnumDescriptions []string `json:"markdownEnumDescriptions,omitempty"` + Properties map[string]*Property `json:"properties,omitempty"` + AnyOf []Property `json:"anyOf,omitempty"` + Default interface{} `json:"default,omitempty"` + MarkdownDescription string `json:"markdownDescription,omitempty"` + Description string `json:"description,omitempty"` + MarkdownDeprecationMessage string `json:"markdownDeprecationMessage,omitempty"` + DeprecationMessage string `json:"deprecationMessage,omitempty"` + Type interface{} `json:"type,omitempty"` + Enum []interface{} `json:"enum,omitempty"` + EnumDescriptions []string `json:"enumDescriptions,omitempty"` + MarkdownEnumDescriptions []string `json:"markdownEnumDescriptions,omitempty"` + Items *Property `json:"items,omitempty"` +} + +type Debugger struct { + Type string `json:"type,omitempty"` + Label string `json:"label,omitempty"` + ConfigurationAttributes struct { + Launch Configuration + Attach Configuration + } `json:"configurationAttributes,omitempty"` +} + +type Configuration struct { + Properties map[string]*Property `json:"properties,omitempty"` } type moduleVersion struct { @@ -130,26 +168,9 @@ func main() { }, []byte("\n\n")) } newContent := append(s, '\n') - - // Return early if the contents are unchanged. - if bytes.Equal(oldContent, newContent) { - return - } - - // Either write out new contents or report an error (if in CI). - if *writeFlag { - if err := ioutil.WriteFile(filename, newContent, 0644); err != nil { - log.Fatal(err) - } - fmt.Printf("updated %s\n", filename) - } else { - base := filepath.Join("docs", filepath.Base(filename)) - fmt.Printf(`%s have changed in the package.json, but documentation in %s was not updated. -To update the settings, run "go run tools/generate.go -w". -`, strings.TrimSuffix(base, ".md"), base) - os.Exit(1) // causes CI to break. - } + checkAndWrite(filename, oldContent, newContent) } + b := &bytes.Buffer{} for i, c := range pkgJSON.Contributes.Commands { fmt.Fprintf(b, "### `%s`\n\n%s", c.Title, c.Description) @@ -162,8 +183,8 @@ To update the settings, run "go run tools/generate.go -w". // Clear so that we can rewrite settings.md. b.Reset() - var properties []Property - var goplsProperty Property + var properties []*Property + var goplsProperty *Property for name, p := range pkgJSON.Contributes.Configuration.Properties { p.name = name if name == "gopls" { @@ -197,6 +218,10 @@ To update the settings, run "go run tools/generate.go -w". rewrite(filepath.Join(dir, "docs", "settings.md"), b.Bytes()) + b.Reset() + generateDebugConfigTable(b, pkgJSON) + rewriteDebugDoc(filepath.Join(dir, "docs", "debugging.md"), b.Bytes()) + // Only update the latest tool versions if the flag is set. if !*updateLatestToolVersionsFlag { return @@ -244,7 +269,7 @@ To update the settings, run "go run tools/generate.go -w". } // TODO(suzmue): change input to json and avoid magic string printing. - toolsString := fmt.Sprintf(string(data), goplsVersion.Version, goplsVersion.Time[:len("YYYY-MM-DD")], goplsVersionPre.Version, goplsVersionPre.Time[:len("YYYY-MM-DD")], dlvVersion.Version, dlvVersion.Time[:len("YYYY-MM-DD")]) + toolsString := fmt.Sprintf(string(data), goplsVersion.Version, goplsVersion.Time[:len("YYYY-MM-DD")], goplsVersionPre.Version, goplsVersionPre.Time[:len("YYYY-MM-DD")], dlvVersion.Version, dlvVersion.Version, dlvVersion.Time[:len("YYYY-MM-DD")]) // Write tools section. b.WriteString(toolsString) @@ -277,7 +302,7 @@ func listAllModuleVersions(path string) (moduleVersion, error) { return version, nil } -func writeProperty(b *bytes.Buffer, heading string, p Property) { +func writeProperty(b *bytes.Buffer, heading string, p *Property) { desc := p.Description if p.MarkdownDescription != "" { desc = p.MarkdownDescription @@ -313,7 +338,7 @@ func writeProperty(b *bytes.Buffer, heading string, p Property) { } } -func defaultDescriptionSnippet(p Property) string { +func defaultDescriptionSnippet(p *Property) string { if p.Default == nil { return "" } @@ -334,11 +359,7 @@ func defaultDescriptionSnippet(p Property) string { fmt.Fprintf(b, "%v", p.Default) } default: - if _, ok := p.Type.([]interface{}); ok { - fmt.Fprintf(b, "%v", p.Default) - break - } - log.Fatalf("implement default when p.Type is %q in %#v %T", p.Type, p, p.Default) + fmt.Fprintf(b, "%v", p.Default) } return b.String() } @@ -367,7 +388,7 @@ func writeMapObject(b *bytes.Buffer, indent string, obj map[string]interface{}) fmt.Fprintf(b, "%v}", indent) } -func writeGoplsSettingsSection(b *bytes.Buffer, goplsProperty Property) { +func writeGoplsSettingsSection(b *bytes.Buffer, goplsProperty *Property) { desc := goplsProperty.MarkdownDescription b.WriteString(desc) b.WriteString("\n\n") @@ -380,58 +401,14 @@ func writeGoplsSettingsSection(b *bytes.Buffer, goplsProperty Property) { sort.Strings(names) for _, name := range names { - pdata, ok := properties[name].(map[string]interface{}) - if !ok { - fmt.Fprintf(b, "### `%s`\n", name) - continue - } - p := mapToProperty(name, pdata) + p := properties[name] + p.name = name writeProperty(b, "###", p) b.WriteString("\n") } } -func mapToProperty(name string, pdata map[string]interface{}) Property { - p := Property{name: name} - - if v, ok := pdata["properties"].(map[string]interface{}); ok { - p.Properties = v - } - if v, ok := pdata["markdownDescription"].(string); ok { - p.MarkdownDescription = v - } - if v, ok := pdata["description"].(string); ok { - p.Description = v - } - if v, ok := pdata["markdownDeprecationMessage"].(string); ok { - p.MarkdownDescription = v - } - if v, ok := pdata["deprecationMessage"].(string); ok { - p.DeprecationMessage = v - } - if v, ok := pdata["type"].(string); ok { - p.Type = v - } - if v, ok := pdata["enum"].([]interface{}); ok { - p.Enum = v - } - if v, ok := pdata["enumDescriptions"].([]interface{}); ok { - for _, d := range v { - p.EnumDescriptions = append(p.EnumDescriptions, d.(string)) - } - } - if v, ok := pdata["markdownEnumDescriptions"].([]interface{}); ok { - for _, d := range v { - p.MarkdownEnumDescriptions = append(p.MarkdownEnumDescriptions, d.(string)) - } - } - if v, ok := pdata["default"]; ok { - p.Default = v - } - return p -} - -func writeSettingsObjectProperties(b *bytes.Buffer, properties map[string]interface{}) { +func writeSettingsObjectProperties(b *bytes.Buffer, properties map[string]*Property) { if len(properties) == 0 { return } @@ -449,12 +426,8 @@ func writeSettingsObjectProperties(b *bytes.Buffer, properties map[string]interf if i == len(names)-1 { ending = "" } - pdata, ok := properties[name].(map[string]interface{}) - if !ok { - fmt.Fprintf(b, "| `%s` | |%v", name, ending) - continue - } - p := mapToProperty(name, pdata) + p := properties[name] + p.name = name desc := p.Description if p.MarkdownDescription != "" { @@ -487,7 +460,7 @@ func writeSettingsObjectProperties(b *bytes.Buffer, properties map[string]interf } // enumDescriptionsSnippet returns the snippet for the allowed values. -func enumDescriptionsSnippet(p Property) string { +func enumDescriptionsSnippet(p *Property) string { b := &bytes.Buffer{} if len(p.Enum) == 0 { return "" @@ -585,3 +558,130 @@ func updateGoplsSettings(oldData []byte, packageJSONFile string, debug bool) (ne } return newData, nil } + +func rewriteDebugDoc(filename string, toAdd []byte) { + oldContent, err := ioutil.ReadFile(filename) + if err != nil { + log.Fatal(err) + } + startSep := []byte(``) + endSep := []byte(``) + startIdx := bytes.Index(oldContent, startSep) + endIdx := bytes.Index(oldContent, endSep) + if startIdx <= 0 || endIdx <= startIdx { + log.Fatalf("Missing valid SETTINGS BEGIN/END markers in %v", filename) + } + part1 := oldContent[:startIdx+len(startSep)+1] + part3 := oldContent[endIdx:] + + newContent := bytes.Join([][]byte{ + part1, + toAdd, + part3, + }, []byte{}) + checkAndWrite(filename, oldContent, newContent) +} + +func generateDebugConfigTable(w io.Writer, pkgJSON *PackageJSON) { + for _, d := range pkgJSON.Contributes.Debuggers { + table := map[string]bool{} + + for k := range d.ConfigurationAttributes.Attach.Properties { + table[k] = true + } + for k := range d.ConfigurationAttributes.Launch.Properties { + table[k] = true + } + + keys := make([]string, 0, len(table)) + for k := range table { + keys = append(keys, k) + } + sort.Strings(keys) + + fmt.Fprintln(w, "| Property | Launch | Attach |") + fmt.Fprintln(w, "| --- | --- | --- |") + + for _, k := range keys { + launch := describeDebugProperty(d.ConfigurationAttributes.Launch.Properties[k]) + attach := describeDebugProperty(d.ConfigurationAttributes.Attach.Properties[k]) + + if launch != "" && attach != "" { + if launch != attach { + fmt.Fprintf(w, "| `%v` | %v | %v |\n", k, launch, attach) + } else { + fmt.Fprintf(w, "| `%v` | %v |
    _same as Launch_
    |\n", k, launch) + } + } else if launch != "" { + fmt.Fprintf(w, "| `%v` | %v |
    _n/a_
    |\n", k, launch) + } else if attach != "" { + fmt.Fprintf(w, "| `%v` |
    _n/a_
    | %v |\n", k, attach) + } + } + } +} + +func describeDebugProperty(p *Property) string { + if p == nil { + return "" + } + b := &bytes.Buffer{} + + desc := p.Description + if p.MarkdownDescription != "" { + desc = p.MarkdownDescription + } + if p == nil || strings.Contains(desc, "Not applicable when using `dlv-dap` mode.") { + return "" + } + + deprecation := p.DeprecationMessage + if p.MarkdownDeprecationMessage != "" { + deprecation = p.MarkdownDeprecationMessage + } + + if deprecation != "" { + fmt.Fprintf(b, "(Deprecated) *%v*
    ", deprecation) + } + fmt.Fprintf(b, "%v
    ", desc) + + if len(p.AnyOf) > 0 { + for i, a := range p.AnyOf { + fmt.Fprintf(b, "

    Option %d: %v
    ", i+1, describeDebugProperty(&a)) + } + } + + if len(p.Enum) > 0 { + var enums []string + for _, i := range p.Enum { + enums = append(enums, fmt.Sprintf("`%#v`", i)) + } + fmt.Fprintf(b, "

    Allowed Values: %v
    ", strings.Join(enums, ", ")) + } + + if p.Type == "object" && len(p.Properties) > 0 { + + var keys []string + for k := range p.Properties { + keys = append(keys, k) + } + sort.Strings(keys) + fmt.Fprintf(b, "

      ") + + for _, k := range keys { + v := p.Properties[k] + fmt.Fprintf(b, "
    • `%q`: %v
    • ", k, describeDebugProperty(v)) + } + fmt.Fprintf(b, "
    ") + } + + if p.Type == "array" && p.Items != nil && p.Items.Type == "object" { + fmt.Fprintf(b, "

    %v
    ", describeDebugProperty(p.Items)) + } + + // Default + if d := defaultDescriptionSnippet(p); d != "" { + fmt.Fprintf(b, "(Default: `%v`)
    ", d) + } + return b.String() +} diff --git a/tools/relnotes/relnotes.go b/tools/relnotes/relnotes.go new file mode 100644 index 0000000000..c1684ba13d --- /dev/null +++ b/tools/relnotes/relnotes.go @@ -0,0 +1,305 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// The relnotes command summarizes the Go changes in Gerrit marked with +// RELNOTE annotations for the release notes. +package main + +import ( + "bytes" + "context" + "flag" + "fmt" + "io/ioutil" + "log" + "path/filepath" + "regexp" + "sort" + "strings" + "time" + "unicode" + + "golang.org/x/build/maintner" + "golang.org/x/build/maintner/godata" +) + +var ( + milestone = flag.String("milestone", "", "milestone associated with the release") + filterDirs = flag.String("dirs", "", "comma-separated list of directories that should be touched for a CL to be considered relevant") + sinceCL = flag.Int("cl", -1, "the gerrit change number of the first CL to include in the output. Only changes submitted more recently than 'cl' will be included.") + project = flag.String("project", "vscode-go", "name of the golang project") + mdMode = flag.Bool("md", false, "write MD output") + exclFile = flag.String("exclude-from", "", "optional path to changelog MD file. If specified, any 'CL NNNN' occurence in the content will cause that CL to be excluded from this tool's output.") +) + +// change is a change that has occurred since the last release. +type change struct { + CL *maintner.GerritCL + Note string // the part after RELNOTE= + Issues []*issue + pkg string +} + +func (c change) TextLine() string { + subj := c.CL.Subject() + subj = c.Note + ": " + subj + return fmt.Sprintf("https://golang.org/cl/%d: %s", c.CL.Number, subj) +} + +type issue struct { + *maintner.GitHubIssue + repo string + owner string +} + +func (i *issue) link() string { + if i.owner == "golang" && i.repo == "go" { + return fmt.Sprintf("https://golang.org/issue/%v", i.Number) + } + return fmt.Sprintf("https://github.com/%s/%s/issues/%v", i.owner, i.repo, i.Number) +} + +func main() { + flag.Parse() + + var existingMD []byte + if *exclFile != "" { + var err error + existingMD, err = ioutil.ReadFile(*exclFile) + if err != nil { + log.Fatal(err) + } + } + + corpus, err := godata.Get(context.Background()) + if err != nil { + log.Fatal(err) + } + + var dirs []string + for _, dir := range strings.FieldsFunc(*filterDirs, func(r rune) bool { + return unicode.IsSpace(r) || r == ',' + }) { + dirs = append(dirs, filepath.ToSlash(dir)) + } + + ger := corpus.Gerrit() + + // Find the cutoff time for changes to include. + start := time.Date(2020, time.August, 1, 00, 00, 00, 0, time.UTC) + ger.ForeachProjectUnsorted(func(gp *maintner.GerritProject) error { + if gp.Server() != "go.googlesource.com" || gp.Project() != *project { + return nil + } + gp.ForeachCLUnsorted(func(cl *maintner.GerritCL) error { + if cl.Status != "merged" { + return nil + } + if *sinceCL >= 0 { + if int(cl.Number) == *sinceCL { + start = cl.Commit.CommitTime + } + } else if cl.Branch() == "release" && cl.Commit.CommitTime.After(start) { + // Try to figure out when the last release was + fmt.Println(cl.Commit.CommitTime) + start = cl.Commit.CommitTime + } + return nil + }) + return nil + }) + + var changes []*change + authors := map[*maintner.GitPerson]bool{} + ger.ForeachProjectUnsorted(func(gp *maintner.GerritProject) error { + if gp.Server() != "go.googlesource.com" || gp.Project() != *project { + return nil + } + gp.ForeachCLUnsorted(func(cl *maintner.GerritCL) error { + // Only include 'master' + if cl.Branch() != "master" { + return nil + } + if cl.Status != "merged" { + return nil + } + if cl.Commit.CommitTime.Before(start) { + // Was in a previous release; not for this one. + return nil + } + + if bytes.Contains(existingMD, []byte(fmt.Sprintf("CL %d ", cl.Number))) { + return nil + } + + // Check that at least one file is in a relevant directory before + // adding the CL. + if len(dirs) > 0 { + var found bool + for _, file := range cl.Commit.Files { + for _, dir := range dirs { + if strings.Contains(file.File, dir) { + found = true + break + } + } + } + if !found { + return nil + } + } + + // try to determine type from issue labels + var issues []*issue + for _, ref := range cl.GitHubIssueRefs { + i := ref.Repo.Issue(ref.Number) + // Don't include pull requests. + if i.PullRequest { + continue + } + issues = append(issues, &issue{ + repo: ref.Repo.ID().Repo, + owner: ref.Repo.ID().Owner, + GitHubIssue: i, + }) + } + + changes = append(changes, &change{ + Note: clRelNote(cl), + CL: cl, + Issues: issues, + pkg: clPackage(cl), + }) + + authors[cl.Owner()] = true + return nil + }) + return nil + }) + + sort.Slice(changes, func(i, j int) bool { + return changes[i].CL.Number < changes[j].CL.Number + }) + + if *mdMode { + fmt.Printf("## TODO: version - ") + now := time.Now() + fmt.Printf("%s\n\n", now.Format("2 Jan, 2006")) + fmt.Printf("### Changes\n\n") + mdPrintChanges(changes, true) + + fmt.Printf("### Issues\n\n") + mdPrintIssues(changes, *milestone) + + fmt.Printf("\n### Thanks\n\n") + mdPrintContributors(authors) + } else { + for _, change := range changes { + fmt.Printf(" %s\n", change.TextLine()) + } + } +} + +func mdPrintChanges(changes []*change, byPackage bool) { + printChange := func(change *change) { + fmt.Printf("- ") + content := change.CL.Subject() + if change.Note != "" && change.Note != "yes" && change.Note != "y" { + // Note contains content + content = change.Note + } + + fmt.Printf("%s", content) + if len(change.CL.GitHubIssueRefs) > 0 { + fmt.Printf(" (") + for i, ref := range change.CL.GitHubIssueRefs { + + if i == 0 { + fmt.Printf("[Issue %d](https://github.com/%s/issues/%d)", ref.Number, ref.Repo.ID().String(), ref.Number) + } else { + fmt.Printf(", [%d](https://github.com/%s/issues/%d)", ref.Number, ref.Repo.ID().String(), ref.Number) + } + } + fmt.Printf(")") + } + fmt.Printf(" \n", change.CL.Number) + } + // Group CLs by package or by number order. + if byPackage { + pkgMap := map[string][]*change{} + for _, change := range changes { + pkgMap[change.pkg] = append(pkgMap[change.pkg], change) + } + for _, changes := range pkgMap { + for _, change := range changes { + printChange(change) + } + } + } else { + for _, change := range changes { + printChange(change) + } + } +} + +func mdPrintIssues(changes []*change, milestone string) { + var issues []*issue + for _, change := range changes { + issues = append(issues, change.Issues...) + } + sort.Slice(issues, func(i, j int) bool { + return issues[i].Number < issues[j].Number + }) + for _, issue := range issues { + if !issue.Closed { + continue + } + fmt.Printf("%s: %s\n", issue.link(), issue.Milestone.Title) + } +} + +// clPackage returns the package name from the CL's commit message, +// or "??" if it's formatted unconventionally. +func clPackage(cl *maintner.GerritCL) string { + subj := cl.Subject() + if i := strings.Index(subj, ":"); i != -1 { + return subj[:i] + } + return "??" +} + +var relNoteRx = regexp.MustCompile(`RELNOTES?=(.+)`) + +func parseRelNote(s string) string { + if m := relNoteRx.FindStringSubmatch(s); m != nil { + return m[1] + } + return "" +} + +func clRelNote(cl *maintner.GerritCL) string { + msg := cl.Commit.Msg + if strings.Contains(msg, "RELNOTE") { + return parseRelNote(msg) + } + for _, comment := range cl.Messages { + if strings.Contains(comment.Message, "RELNOTE") { + return parseRelNote(comment.Message) + } + } + return "" +} + +func mdPrintContributors(authors map[*maintner.GitPerson]bool) { + var names []string + for author := range authors { + names = append(names, author.Name()) + } + sort.Strings(names) + if len(names) > 1 { + names[len(names)-1] = "and " + names[len(names)-1] + } + + fmt.Printf("Thank you for your contribution, %s!\n", strings.Join(names, ", ")) +}