Giter VIP home page Giter VIP logo

vscode-go's Introduction

Go for Visual Studio Code

Slack

The VS Code Go extension provides rich language support for the Go programming language.

Requirements

  • Visual Studio Code 1.75 or newer (or editors compatible with VS Code 1.75+ APIs)
  • Go 1.18 or newer

Quick Start

Welcome! πŸ‘‹πŸ»
Whether you are new to Go or an experienced Go developer, we hope this extension fits your needs and enhances your development experience.

  1. Install Go 1.18 or newer if you haven't already.

  2. Install the VS Code Go extension.

  3. Open any Go file or go.mod file to automatically activate the extension. The Go status bar appears in the bottom right corner of the window and displays your Go version.

  4. The extension depends on go, gopls (the Go language server), and optional tools depending on your settings. If gopls is missing, the extension will try to install it. The ⚑ sign next to the Go version indicates the language server is running, and you are ready to go.


(Install Missing Tools)

You are ready to Go :-) Β Β  πŸŽ‰πŸŽ‰πŸŽ‰

What's next

If you are new to Go, this article provides the overview on Go code organization and basic go commands. Watch "Getting started with VS Code Go" for an explanation of how to build your first Go application using VS Code Go.

Feature highlights

  • IntelliSense - Results appear for symbols as you type.
  • Code navigation - Jump to or peek at a symbol's declaration.
  • Code editing - Support for saved snippets, formatting and code organization, and automatic organization of imports.
  • Diagnostics - Build, vet, and lint errors shown as you type or on save.
  • Enhanced support for testing and debugging

See the full feature breakdown for more details.


(Code completion and Signature Help)

In addition to integrated editing features, the extension provides several commands for working with Go files. You can access any of these by opening the Command Palette (Ctrl+Shift+P on Linux/Windows and Cmd+Shift+P on Mac), and then typing in the command name. See the full list of commands provided by this extension.


(Toggle Test File)

⚠️ Note: the default syntax highlighting for Go files is provided by a TextMate rule embedded in VS Code, not by this extension.

For better syntax highlighting, we recommend enabling semantic highlighting by turning on Gopls' ui.semanticTokens setting. "gopls": { "ui.semanticTokens": true }

Setting up your workspace

The VS Code Go extension supports both GOPATH and Go modules modes.

Go modules are used to manage dependencies in recent versions of Go. Modules replace the GOPATH-based approach to specifying which source files are used in a given build, and they are the default build mode in go1.16+. We highly recommend Go development in module mode. If you are working on existing projects, please consider migrating to modules.

Unlike the traditional GOPATH mode, module mode does not require the workspace to be located under GOPATH nor to use a specific structure. A module is defined by a directory tree of Go source files with a go.mod file in the tree's root directory.

Your project may involve one or more modules. If you are working with multiple modules or uncommon project layouts, you will need to configure your workspace by using Workspace Folders. See the Supported workspace layouts documentation for more information.

Preview version

If you'd like to get early access to new features and bug fixes, you can use the nightly build of this extension. Learn how to install it in by reading the Go Nightly documentation.

Telemetry

VS Code Go extension relies on the Go Telemetry to learn insights about the performance and stability of the extension and the language server (gopls). Go Telemetry data uploading is disabled by default and can be enabled with the following command:

go run golang.org/x/telemetry/cmd/gotelemetry@latest on

After telemetry is enabled, the language server will upload metrics and stack traces to telemetry.go.dev. You can inspect what data is collected and can be uploaded by running:

go run golang.org/x/telemetry/cmd/gotelemetry@latest view

If we get enough adoption, this data can significantly advance the pace of the Go extension development, and help us meet a higher standard of reliability. For example:

  • Even with semi-automated crash reports in VS Code, we've seen several crashers go unreported for weeks or months.
  • Even with a suite of benchmarks, some performance regressions don't show up in our benchmark environment (such as the completion bug mentioned below!).
  • Even with lots of great ideas for how to improve gopls, we have limited resources. Telemetry can help us identify which new features are most important, and which existing features aren't being used or aren't working well.

These are just a few ways that telemetry can improve gopls. The telemetry blog post series contains many more.

Go telemetry is designed to be transparent and privacy-preserving. Learn more at https://go.dev/doc/telemetry.

Contributing

We welcome your contributions and thank you for working to improve the Go development experience in VS Code. If you would like to help work on the VS Code Go extension, see our contribution guide to learn how to build and run the VS Code Go extension locally and contribute to the project.

Code of Conduct

This project follows the Go Community Code of Conduct. If you encounter a conduct-related issue, please mail [email protected].

License

MIT

vscode-go's People

Contributors

brycekahle avatar egamma avatar eliben avatar firelizzard18 avatar goenning avatar hyangah avatar ironcladlou avatar jamalc avatar jhendrixmsft avatar karthikraobr avatar kegsay avatar leaxoy avatar lggomez avatar lukehoban avatar m90 avatar mcjcloud avatar newhook avatar oneslash avatar pjweinbgo avatar polinasok avatar quoctruong avatar ramya-rao-a avatar roblourens avatar segevfiner avatar stamblerre avatar suzmue avatar tampajohn avatar torn4dom4n avatar uudashr avatar zmb3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-go's Issues

vscode for go need refactor feature

Hello, first of all, let me say that GoCode is a really cool package and I especially appreciate the support for Delve that it gives me. What would be really nice would be some form of refactoring. Maybe just "Extract Method" to start with as this is probably the most likely refactoring feature to be needed. Alternatively, do you or anyone else know of any Golang refactoring extensions for VS Code?

docs: improve documentation about the go tools installed by the extension

I'm getting daily notifications that I'm missing some add-ons for Go. It would be nice if you could select in Settings which add-ons you want to use and which ones not, I really don't want to use formatting type add-ons for example which auto format the code in a certain way. Also an explanation would be nice of what the add-on exactly does so that it would be easy to select which ones you want. Currently a lot of Go extensions got automatically installed on my VSCode and it is not clear to me what they do.

debug: automatically Infer Path Mapping for Remote Debugging

Background

Existing Implementation

Currently, we are using 2 attributes in the launch configuration to configure path mapping: cwd and remotePath.

cwd - Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
remotePath - Absolute path to the file being debugged on the remote machine in case of remote debugging.

Let’s say the local path is C:\Users\quoct\Github\project\hello-world and the remote path is /app/project/hello-world.

Processing and Storing the local and remote path

Using the path in cwd and remotePath, we detect the local path separator (LPS) and remote path separator (RPS) respectively.

With these separators, we attempt to find the longest common suffix between the 2 paths. For the example above, that would be project/hello-world.

We truncate the longest common suffix from the local and remote path and store them internally. For the example above, that would be C:\Users\quoct\Github and /app. If there are no common suffixes, we just trim the last path separator of the remote path. Let’s call these processed local root (PLR) and processed remote root (PRR) respectively.

Setting a breakpoint

This happens when the user sets a breakpoint in a file, for example: C:\Users\quoct\Github\project\hello-world\testing.go.

We use the remote path separator in the file name. So it will become C:/Users/quoct/Github/project/hello-world/testing.go. We then substitute the PLR (C:\Users\quoct\Github) with the PRR (/app). So now the breakpoint file will become /app/project/hello-world/testing.go. We call Delve to set a breakpoint in this file.

Breakpoint hit

This happens if a breakpoint is hit on the remote Delve instance. In this case, Delve will send us back the name of the file that contains the breakpoint and we will have to map this file to a file on the local machine. Let’s say the name of the file is /app/project/hello-world/testing.go.

If the path to convert starts with the PRR (/app), we then substitute the PRR with the PLR (C:\Users\quoct\Github) in the path. So it will become C:\Users\quoct\Github\project\hello-world\testing.go. There seems to be a BUG here where we are not taking into account different path separators for remote and local roots.

If it doesn’t start with the PRR, then we assume that it can be mapped to a file in the GOROOT directory. We do this by assuming that the remote file’s name starts with /app (which is another BUG?).

Problems

A lot of times users don’t know that they have to provide path mapping for the breakpoints to hit. Even if they do, they don’t provide the correct path mappings. So what happens is that the debugger appears to be running but no breakpoints are hit. This can cause a lot of confusion to the users.
Users currently cannot set breakpoints for packages in GOPATH. There is a proposal to add another field to map this. Even the experience for setting breakpoints for files in GOROOT is not great as we are blindly assuming that the GOROOT starts with /src.
The current implementation expects the paths to be absolute but they can be relative. There are PRs out there trying to address this by introducing more fields

Proposal

Instead of trying to add multiple fields to address the relative path mapping and GOPATH problems, we can fix these problems and reduce the user’s friction points by attempting to automatically infer the path mapping for the user.

Delve has an API to list all the files used by the program. So we can simply get the list of files on the remote machine and map it to the files on the local machine. These include files in the GOROOT and GOPATH on the remote machine as well so we can try to map them to the files in the local machine GOROOT and GOPATH.

Mapping local path to remote path

Since we get all the remote sources, we can retrieve all the remote source files that share the same file name with the local file. We can then do a suffix match to get the best matching remote path.
Mapping remote path to local path
This is more complicated because there are multiple places where we can try to find a match on the local machine.

However, we can use the ListPackagesBuildInfo to help us retrieve all the different Go packages used. Each package item returned comes with a Directory Path and an Import Path. Using Directory Path, we can determine if the remote path is in a particular package or not:

  • If the remote path is in a package, we can try to find whether the package exists on the local machine. We will be searching for it in 3 places:

    • The current user’s workspace folder.
    • The current user’s GOPATH.
    • The current user’s GOMOD folder (%GOMOD%/pkg/mod) if the package name contains pkg/mod.
  • If the remote path is not in any package, then we retrieve the name of the remote path and search for files with that name in the current workspace folder. We find the best matching one using a suffix match.

@polinasok @hyangah @stamblerre

process: factor out a helper function for running tools

cp.execFile is used throughout the codebase to run various commands. Considering we run different tools all the time, it would be useful to have a helper function to abstract this a bit. #91 is a good justification for it.

We might also want to have a separate set of helpers for running go commands specifically.

debug: changing to a different goroutine and executing Step Over goes back to the previous goroutine

From microsoft/vscode-go#2560 by @aarzilli:

  1. Debug https://github.com/aarzilli/delve_client_testing/blob/master/08gswitch/main.go
  2. Click on one of the paused goroutines executing main.coroutine in the left column
  3. Click Step Over

Expected:

Cursor moves to the next line on the goroutine I'm currently watching.

What actually happend

Debuggers switches back to the goroutine it was originally stopped at and moves to the next line.

testing: Go Extension Tests With Gopls/Completion middleware testing is failing

https://github.com/golang/vscode-go/pull/44/checks?check_run_id=693415725
and other CI runs. (currently we are ignoring the test failures from this gopls integration tests because they are flaky)

1 failing
  1) Go Extension Tests With Gopls
       Completion middleware:
     Error: Timeout of 1000000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/vscode-go/vscode-go/out/test/gopls/extension.test.js)
  	at listOnTimeout (internal/timers.js:531:17)
  	at processTimers (internal/timers.js:475:7)

cc/ @stamblerre

performance: consider bundling extension

Original bug report is microsoft/vscode-go#2997

This extension got bigger. vsce recommends https://aka.ms/vscode-bundle-extension

This extension consists of 2266 files, out of which 1509 are JavaScript files. 
For performance reasons, you should bundle your extension: 
https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary 
files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

microsoft/vscode-extension-telemetry#41
(due to microsoft/ApplicationInsights-node.js-native-metrics#4) was one of the road blockers. We can probably prune the dependency.

Not sure about interaction with debug adapter yet.

unable to debug using Go Nightly

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version devel +6bf2eea62a 2020-05-28 14:43:19 +0000 linux/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.45.1 (and latest inside as of 10 minutes ago as well)
  • Check your installed extensions to get the version of the VS Code Go extension
    • works: 0.14.3, doesn't work: 2020.5.2722
  • Run go env to get the go development environment details
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/oneofone/code/go/bin"
GOCACHE="/home/oneofone/.cache/go-build"
GOENV="/home/oneofone/.config/go/env"
GOEXE=""
GOFLAGS="-gcflags=-c=16"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oneofone/code/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oneofone/code/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/src/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/src/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build413442895=/tmp/go-build -gno-record-gcc-switches"

Share the Go related settings you have added/edited

	"go.buildOnSave": "off",
	"go.vetOnSave": "off",
	"go.lintOnSave": "off",
	"go.useCodeSnippetsOnFunctionSuggest": true,
	"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
	"go.autocompleteUnimportedPackages": true,
	"go.lintTool": "staticcheck",
	"go.editorContextMenuCommands": {
		"toggleTestFile": true,
		"addTags": true,
		"removeTags": true,
		"testAtCursor": false,
		"testFile": false,
		"testPackage": true,
		"generateTestForFunction": true,
		"generateTestForFile": false,
		"generateTestForPackage": true,
		"addImport": false,
		"testCoverage": true,
		"playground": false
	},
	"go.addTags": {
		"tags": "json",
		"options": "json=omitempty",
		"promptForTags": false,
		"transform": "camelcase"
	},
	"go.coverOnSingleTest": true,
	"go.gotoSymbol.includeGoroot": true,
	"go.useLanguageServer": true,
	"go.languageServerExperimentalFeatures": {
		"format": true,
		"diagnostics": true,
		"documentLink": true
	},
	"go.delveConfig": {
		"dlvLoadConfig": {
			"followPointers": true,
			"maxVariableRecurse": 1,
			"maxStringLen": 64,
			"maxArrayValues": 64,
			"maxStructFields": -1
		},
		"apiVersion": 2,
		"showGlobalVariables": true
	},
	"gopls": {
		"env": {},
		"staticcheck": true,
		"analyses": {
			"ST1000": false,
			"ST1003": false
		},
		"codelens": {
			"generate": true,
			"upgrade.dependency": true,
			"test": true
		},
		"usePlaceholders": false,
		"completeUnimported": true,
		"deepCompletion": true
	},

Describe the bug

Using this launch.json config:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Launch",
			"type": "go",
			"request": "launch",
			"mode": "auto",
			"program": "${workspaceFolder}",
			"env": {},
			"trace": "verbose",
			"args": [""]
		}
	]
}

I can't start debugging with the nightly version, same config and settings and everything works perfectly fine with the previous version.

Steps to reproduce the behavior:

  1. Press F5 to start the debugger.
  2. Debug bar shows for a second then disappears.
  3. Debug Console output is empty.
  4. Go debug channel is empty.
  5. The only log that changes is Log (Window) and it shows:
[2020-05-28 15:05:39.020] [renderer1] [error] timeout after 1000 ms: Error: timeout after 1000 ms
    at t.RawDebugSession.handleErrorResponse (file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3061:355)
    at file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3060:679
    at async t.RawDebugSession.shutdown (file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3058:772)

gorename: package xxx is not in GOROOT

Please direct general questions to:

Please review the documentation before filing an issue.
Helpful pages include:

Please answer these questions before submitting your issue. Thanks!

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • 1.14
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.45.1
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.14.3
  • Run go env to get the go development environment details
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\admin\AppData\Local\go-build
set GOENV=C:\Users\admin\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=gitlab.c21sis.com
set GONOSUMDB=gitlab.c21sis.com
set GOOS=windows
set GOPATH=d:\go_workspace
set GOPRIVATE=gitlab.c21sis.com
set GOPROXY=https://goproxy.io/
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\go_workspace\src\pink-api\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\admin\AppData\Local\Temp\go-build671071106=/tmp/go-build -gno-record-gcc-switches

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

{
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
    "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",
    "window.zoomLevel": 0,
    "go.formatTool": "goimports",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "editor.fontSize": 16,
    "files.autoSave": "afterDelay",
    "java.home": "C:\\Program Files\\RedHat\\java-11-openjdk-11.0.6-2\\",
    "java.help.firstView": "gettingStarted",
    "java.requirements.JDK11Warning": true,
    "maven.terminal.useJavaHome": true,
    "java.semanticHighlighting.enabled": true,
    "terminal.integrated.shell.linux": "",
    "terminal.integrated.automationShell.linux": "",
    "terminal.integrated.automationShell.osx": "",
    "terminal.integrated.automationShell.windows": "",
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-11",
            "path": "C:\\Program Files\\RedHat\\java-11-openjdk-11.0.6-2\\",
        }
    ],
    "java.maven.updateSnapshots": true,
    "maven.executable.path": "C:\\java\\apache-maven-3.6.3\\bin\\mvn",
    "java.configuration.maven.userSettings": "C:\\java\\apache-maven-3.6.3\\conf\\settings.xml",
    "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:\"c:\\Users\\admin\\.vscode\\extensions\\gabrielbb.vscode-lombok-1.0.1\\server\\lombok.jar\"",
    "remote.SSH.remotePlatform": {
        "105": "linux"
    },
    "git.ignoreLegacyWarning": true,
    "go.autocompleteUnimportedPackages": true,
    "go.addTags": {
    
    }
}

Describe the bug

A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

  1. seelct type name
  2. press F2 rename
  3. See error :Rename failed: gorename: package pink-api/service/sissvc is not in GOROOT (c:\go\src\pink-api\service\sissvc)

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.

repository management: determine prefixes for issues and changelists

The typical practice in the rest of the Go project is to prefix issues and CLs with the name of the package they pertain to. This doesn't really make sense for this repository, as there are no Go packages.

These issue prefixes are helpful for classification, so it'd be nice to stick with them, but we don't seem to have a consistent strategy for applying them. doc is useful for documentation changes, but the analogous src for code changes is not really useful. We should restructure the code in such a way that we can have useful prefixes.

Furthermore, for issues, I think we need to create prefixes, some of which may collide with existing labels. For example, debug is useful as a prefix for skimming issues quickly, but also useful as a label for quick searches.

/cc @hyangah

debug: issues displaying dereferenced pointer value in the Variable pane

From @willfaught in microsoft/vscode-go#2176:

The dereferenced pointer value is labeled with a single colon, which might be a bug. See the b variable below:

screen shot 2018-12-04 at 11 42 02 pm

The debugger presentation of the pointer type seems incompatible with the other integral types (variables i and x in the example above). int(0) is displayed as i: 0, X(34) (where X is type X int) is displayed as x: 34, but (*int)(0xc0000160f8) is displayed as p: <*int>(0xc0000160f8). Maybe it makes sense to display it as just p: 0xc0000160f8 and let the user infer the type from the code like for the other variable types (and the presence of the drill down menu)?

Please see microsoft/vscode-go#2176 for more discussion on this

coverage: show code coverage for multiple packages

Currently, the code coverage is applied only to the files that fall under the package corresponding to the current file that is open. The feature request is to support showing code coverage for multiple packages.

While using the flag -coverpkg=all, the go test command does create a cover profile for all packages, the extension fails to apply it correctly. The problem lies in converting the relative paths in the cover profile to absolute paths that the editor can understand.

For more, please see microsoft/vscode-go#816,

gopls installation works only with go 1.13+

Recent versions of gopls (v0.4.1+) depends on new APIs available only after go1.13+

../../../../pkg/mod/golang.org/x/[email protected]/internal/jsonrpc2/messages.go:168:5: undefined: errors.As

We have a couple of options to consider

  • suggest a compatible version of gopls for users with old versions of Go or
  • ask to use the latest version of Go to build the gopls or
  • ask to upgrade Go (this may not be desirable for users who need to use old versions, e.g. comparison, regression testing, etc)
  • download prebuilt language servers (properly signed and should be verifiable)

@stamblerre @ianthehat

test: remove dependency on source code in GOPATH

Current tests require GOPATH env var to be explicitly set
(

assert.ok(gopath, 'Cannot run tests if GOPATH is not set as environment variable');
)

and depend on source code preexisting under GOPATH/src.
(

// Since the Go extension takes a dependency on the godef tool at github.com/rogpeppe/godef
)

That is not ideal. Fix that.

tree-kill: spawns too many pgrep processes, causing the extension to become unresponsive

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.14.3 darwin/amd64 (both computers affected macOS 10.13 (macpro 4.1) and 10.14 (MacBook 2015))
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • a most recent version of the vscode created with yarn watchd.
  • Check your installed extensions to get the version of the VS Code Go extension
    • just go (1.14.3)
  • Run go env to get the go development environment details
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/butuzov/Library/Caches/go-build"
GOENV="/Users/butuzov/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/butuzov/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/go-build894571270=/tmp/go-build -gno-record-gcc-switches -fno-common"

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.

{
        // Go
        "go.useLanguageServer": false,
        "go.languageServerFlags": [],
        "go.languageServerExperimentalFeatures": {
            "autoComplete": true,
            "diagnostics": true,
            "documentLink":  true,
            "documentSymbols": true,
            "findReferences": true,
            "format": true,
            "goToDefinition": true,
            "goToImplementation": true,
            "goToTypeDefinition": true,
            "hover": true,
            "rename": true,
            "signatureHelp": true,
            "workspaceSymbols": true,
        },
        "[go]": {
            "editor.formatOnSave": true,
            "editor.rulers": [
                {  "column": 80, "color": "#61bde670"},
                {  "column": 100, "color": "#35ace270"},
                {  "column": 120, "color": "#0053b070"},
            ],
            "editor.snippetSuggestions": "top",
            "editor.codeActionsOnSave": {
                "source.organizeImports": true
            }
        },
        "[go.mod]": {
            "editor.formatOnSave": true,
            "editor.codeActionsOnSave": {
                "source.organizeImports": true,
            },
        },
        "go.formatTool": "goimports",
        // "go.lintTool": "golint",
    
        "go.gotoSymbol.ignoreFolders": [],
        "go.gotoSymbol.includeImports": true,
        "go.gotoSymbol.includeGoroot": false,
    
    
        // "go.lintTool": "golint",
        "go.lintTool": "golangci-lint",
        "go.lintFlags": [
            "--disable-all",
            "--fast",
            "--print-issued-lines=false",
            "--out-format=colored-line-number",
            "--issues-exit-code=0",
            "--enable=deadcode",
            "--enable=gocyclo",
            "--enable=golint",
            "--enable=varcheck",
            "--enable=structcheck",
            "--enable=maligned",
            "--enable=errcheck",
            "--enable=dupl",
            "--enable=ineffassign",
            "--enable=interfacer",
            "--enable=unconvert",
            "--enable=goconst",
            "--enable=gosec",
            "--enable=megacheck"
        ],
        "go.delveConfig": {
            "dlvLoadConfig": {
                "followPointers": true,
                "maxVariableRecurse": 1,
                "maxStringLen": 64,
                "maxArrayValues": 64,
                "maxStructFields": -1
            },
            "apiVersion": 2,
            "showGlobalVariables": true
        },
    
        "go.editorContextMenuCommands": {
            "toggleTestFile": false,
            "addTags": false,
            "removeTags": false,
            "fillStruct": true,
            "testAtCursor": false,
            "testFile": false,
            "testPackage": false,
            "generateTestForFunction": true,
            "generateTestForFile": true,
            "generateTestForPackage": false,
            "addImport": false,
            "testCoverage": true,
            "playground": true,
            "debugTestAtCursor": true
        },  
}

Describe the bug

Pressing "save" (cmd+s) triggering state when vscode starts to overwhelm CPU with spawning new processes (via node module tree-kill as I understand). Spawning never stops, so you need to reload vscode.

Steps to reproduce the behavior:

  1. Open the typical main.go
  2. cmd+s few times
  3. see pgrep processes spawned.

Code- OSS Helper

[32307:0524/212738.492110:INFO:CONSOLE(152)] "Extension Host", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (152)
[32307:0524/212738.492232:INFO:CONSOLE(153)] "%cDebugger attached.
 color: red", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (153)
[32307:0524/212738.492311:INFO:CONSOLE(154)] "console.groupEnd", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (154)
[32307:0524/212740.631879:INFO:CONSOLE(139)] "%c WARN color: #993 UNRESPONSIVE extension host, 'ms-vscode.Go' took 85% of 1949.038ms, saved PROFILE here: '/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/exthost-732eca.cpuprofile' [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
[32307:0524/212740.697337:INFO:CONSOLE(143)] "%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5870/b1fad246-b102-4417-8e40-987d28420cf3 color: blue color:", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (143)
[32307:0524/212744.225285:INFO:CONSOLE(152)] "Extension Host", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (152)
[32307:0524/212744.225409:INFO:CONSOLE(153)] "%cDebugger attached.
 color: red", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (153)
[32307:0524/212744.225500:INFO:CONSOLE(154)] "console.groupEnd", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (154)
[32307:0524/212749.476305:INFO:CONSOLE(139)] "%c WARN color: #993 UNRESPONSIVE extension host, 'ms-vscode.Go' took 99% of 5099.625ms, saved PROFILE here: '/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/exthost-a4b283.cpuprofile' [object Object],[object Object],[object Object],[object Object]", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
[32307:0524/212749.553382:INFO:CONSOLE(143)] "%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5870/b1fad246-b102-4417-8e40-987d28420cf3 color: blue color:", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (143)
[32307:0524/212757.658456:INFO:CONSOLE(144)] "%c  ERR color: #f33 Server returned 422: Error: Server returned 422
    at Object.asText (file:///Volumes/develop/vscode/out/vs/platform/request/common/request.js:19:19)
    at createSlowExtensionAction (file:///Volumes/develop/vscode/out/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.js:83:41)
    at async ExtensionsAutoProfiler._processCpuProfile (file:///Volumes/develop/vscode/out/vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler.js:131:32)", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (144)
[32307:0524/212901.205451:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.205714:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.205900:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206012:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206194:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206455:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206576:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206671:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206780:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206958:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207141:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207244:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207530:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207620:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207774:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207884:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.208032:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.208124:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.516893:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517060:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517150:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517236:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517328:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517669:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517768:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517851:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517939:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518018:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518101:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518183:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518272:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518384:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518476:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518557:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518643:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518729:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550162:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.550403:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550495:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.550578:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550672:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551013:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551110:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551191:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551280:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551364:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551452:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551537:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551627:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551708:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551795:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551877:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551968:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.552053:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.552138:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.552224:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
^C[32307:0524/212927.646430:INFO:CONSOLE(106)] "Extension host terminated unexpectedly. Code:  null  Signal:  SIGINT", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/common/abstractExtensionService.js (106)
[32307:0524/212927.696065:INFO:CONSOLE(30)] "Extension host terminated unexpectedly.", source: file:///Volumes/develop/vscode/out/vs/workbench/browser/parts/notifications/notificationsAlerts.js (30)
[32307:0524/212927.712090:INFO:CONSOLE(139)] "%c WARN color: #993 Canceled: Canceled", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
 $ butuzov  (⎈  minikube@default)  /Volumes/develop/vscode
 >

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
image

process: replace json-rpc2 with vscode-jsonrpc

From microsoft/vscode-go#2861 by @OneOfOne:

┏━ oneofone@voyager ❰~/c/v/vscode-go❱ ❰master|✚2❱
┗━● npm audit

=== npm audit security report ===                        

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                Manual Review                                 β”‚
β”‚            Some vulnerabilities require your attention to resolve            β”‚
β”‚                                                                              β”‚
β”‚         Visit https://go.npm.me/audit-guide for additional guidance          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Low           β”‚ Prototype Pollution                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ lodash                                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=4.17.5                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ json-rpc2                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ json-rpc2 > lodash                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://npmjs.com/advisories/577                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High          β”‚ Prototype Pollution                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ lodash                                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=4.17.11                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ json-rpc2                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ json-rpc2 > lodash                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://npmjs.com/advisories/782                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ High          β”‚ Prototype Pollution                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ lodash                                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=4.17.12                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ json-rpc2                                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ json-rpc2 > lodash                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://npmjs.com/advisories/1065                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
found 3 vulnerabilities (1 low, 2 high) in 441 scanned packages
3 vulnerabilities require manual review. See the full report for details.

installation: improve tool installation process

Some ideas:

  • Make sure all tools that can be installed with modules
  • Consider using one of the newest stable Go versions to build tools regardless what target go version user is using for the project.
  • Consider pinning tools at specific major versions to avoid breakages (an idea, not necessarily something I'm advocating for)
  • Any tool that self-reports its version should be used to offer upgrades (like is done for gopls)

I'm sure there are other improvements we can make, so please add more here.

gopls: Invalid auto-completion result for pointer type fields

Extension inserts source pointer type definition instead a valid pointer literal. For example if we have 2 types like:

type MyInt int

type MyStruct struct {
   Field *MyInt
}

Then If I start typing something like below, I get auto-completed list with *MyInt type for the Field:

ms := MyStruct{
   Field: *MyInt...
}

but expected and valid result is:

ms := MyStruct{
   Field: &MyInt...
}

So you should replace * with & before insertion.

Setup CI/CD

Set up CI/CD

  • CI workflow is triggered for every Gerrit CLs.
  • CD releases a new version of extension nightly from the master branch.

debug: clicking 'debug test' twice runs two instances of the debugger simultaneously

In a test file, when the debug test codelens is clicked twice, two instances of the debugger are started. Ideally, the second click should result in an error notifying that a debug session is already in progress

Steps to reproduce:

  1. Set a breakpoint.
  2. Click 'debug test' and wait to hit the breakpoint.
  3. Step one line forward.
  4. Click 'debug test' and wait to hit the breakpoint, again.

For more, including pointers on how to fix this, please see microsoft/vscode-go#1383.

debug: support function calls via delve 'call'

Following up from microsoft/vscode-go#2655 as it was the most upvoted feature there and is still badly needed.

Description

Delve has added the call command to be able to make function calls while in debug.

Trying to execute any function in VSCode Debug Console results in:
Unable to eval expression: "function calls not allowed without using 'call'"

There was a patch attached in the linked issue that added basic support for this feature. I can add a PR rebased on the latest version of the code to see if it's possible to continue from there.

debug: prompt users with helpful info when launch is requested without main or test packages

Is your feature request related to a problem? Please describe.
If the active tab does not contain the main package when we start debugging the debugger exits with the following message:
go run: cannot run non-main package

This forces the user to change tabs before debugging, distracting from the code of interest.

Describe the solution you'd like
When debugging starts, all currently open tabs should be checked for a main package and if found the file associated with that tab should be passed to go run instead of the file associated with the active tab.

Describe alternatives you've considered
Custom workspace settings maybe?

test/integration: add thorough tests for the tool installation process

The extension manages installing tools for users, but this process is currently not covered by any tests. The biggest danger here is that we don't have an effective way of noticing issues in the tools that the extension depends on.

We need both some form of testing for the installation process that can run in the normal test suite, as well as integration tests that use the network to install tools. These tests should only run in CI (perhaps only before a Nightly release). @hyangah suggested using an environment variable to control this behavior, which sounds reasonable -- unless @ramya-rao-a, is there is a better way that you're aware of?

Also, the tests that check for updates to gopls rely on the current versions of gopls, so when new versions of gopls are published - they break. We need to make these tests more resilient.

generated code warning shown only if comment on first line of file

This is a copy of the vscode-go#3243

Is your feature request related to a problem? Please describe.
vscode-go only notice generated files with // Code generated ... DO NOT EDIT pattern at the first line. There are actually two problems with this.

  1. ~ // Code generated ... DO NOT EDIT described by go help generate and in https://golang.org/s/generatedcode is more desirable state than, actual fact. See Examples (1, 2). As of now people still put (sometimes) "different code generated message", except all of them have DO NOT EDIT marker.
  2. Quoting Rob Pike The text may appear anywhere in the file., not just on the first line (as it done now).

Examples

  1. some examples from golang/go
find . -name "*.go" -exec cat "{}" \;  | grep -E "^// .*?DO NOT EDIT" | uniq -c | sort -nr 
...
155 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 18 // Created by cgo -godefs - DO NOT EDIT
  5 // DO NOT EDIT
  1 // GENERATED BY make_perl_groups.pl; DO NOT EDIT.
  1. Search for go files on a GitHub gives more examples of the same behavior

Propose

What community really follows is a DO NOT EDIT phrase in a comment. Can we also have this a trigger to show This file seems to be generated. DO NOT EDIT. error message?

PR

This issue is followed by PR that implements described/desirable behavior.

gopls: support a setting to control the frequency of diagnostics

It's possible that some users might like to see diagnostics only when they save a file, rather than seeing them as they type.
It is also possible that some users may want to use gopls without seeing any diagnostics at all.

Depending on the popularity of these use cases, we should consider supporting these two configurations.

Please react with a πŸš€ if you would like to see diagnostics only when you save a file, not as you type.
Please react with a ❀️ if you would like to disable diagnostics from gopls completely.

Original discussion on microsoft/vscode-go#2907.

debug: opaque error message when "go.toolsEnvVars" are incompatible with host machine

From microsoft/vscode-go#2696 by @firelizzard18:

Steps to Reproduce:

  1. Open a Go project that has launch configurations
  2. Open settings and edit "go.toolsEnvVars" and add "GOOS": "windows" (or "GOOS": "linux" if your OS is Windows)
  3. Attempt to launch a debug session

The error:

could not launch process: stub exited while waiting for connection: exit status 0
Process exiting with code: 1

The issue is that it is not at all obvious why this is failing. Ideally, vscode-go would know that the debugger failed because of GOOS/GOARCH. But I don't know how it would do that, without dlv providing a more meaningful error. Failing that, a warning would be nice. "By the way, we see you've changed GOOS/GOARCH such that the debugger will likely fail."

UI: Documentation tooltip keeps shrinking when close to the right side of the window

What version of Go, VS Code & VS Code Go extension are you using?

  • go: go1.14.2 darwin/amd64
  • code 1.45.1 5763d909d5f12fe19f215cbfdd29a91c0fa9208a x64
  • Go extension: 0.14.2

Describe the bug

When you type code that's close to the right edge of the VS code window, the documentation tooltip keeps shrinking until its left margin reaches the position of the caret.

Here's how it looks like:

ezgif com-gif-maker

Steps to reproduce the behavior:

  1. Type code close to the right edge of the VS code window and observe the documentation tooltip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.