Skip to content

Commit 6e0dbec

Browse files
committed
[release] prepare v0.18.0 release (2) @186ffe2
186ffe2 CHANGELOG: change log for v0.18.0 972fb46 src/goTools: update gopls latestVersion to 0.5.1 743aca1 docs: update documentation for Go status bar 222e0d0 package.json: recognize gopls.mod as a go.mod file c9b9618 src/debugAdapter: log all the env vars passed to dlv 4af2ecc src/goInstallTools: use the 'go' command from GOROOT/bin for tool install f0c87a6 src/util,goInstallTools: log 'cwd' b712568 src/goMain: change gopls_gc_details to gopls.gc_details 76e3f4c src/goLanguageServer: add survey config inspection commands b44ecdb Revert "src/goLanguageServer: enable survey for the go extension users" Change-Id: I7d62cf3518d7847b5c2dda52af4eacf3a933a6d3
2 parents 5a991c1 + 186ffe2 commit 6e0dbec

15 files changed

+168
-36
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
## v0.18.0 - 23rd Oct, 2020
2+
3+
Unified Go status UI ⚡, many debugger feature improvements, and LSP 3.16 features! A list of all issues fixed with this release can be found in the [v0.18.0 milestone](https://github.com/golang/vscode-go/milestone/11).
4+
5+
### New Features
6+
- The new Go status bar provides a menu to manage the go version, open the gopls trace, open the `go.mod` file, and more. The old `Go Modules` status bar was removed in favor of this new unified status bar. See [VS Code Go UI documentation](https://github.com/golang/vscode-go/blob/master/docs/ui.md) to learn more about this.
7+
- New `Go: Toggle gc details` command toggles the display of compiler optimization choice for the open Go source file ([CL 256658](https://go-review.googlesource.com/c/vscode-go/+/256658)).
8+
- Upgraded LSP to [`3.16`](https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#whatIsNew). Users of recent `gopls` can access new features such as [`Call hierarchy`](https://code.visualstudio.com/updates/v1_33#_call-hierarchy) and [`Semantic tokens`](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-provider).
9+
10+
### Enhancement
11+
12+
- Debugging:
13+
* Correctly presents the reason when the debugged program stops due to `panic` and `fatal error` ([Issue 648](https://github.com/golang/vscode-go/issues/649)).
14+
* Be explicit about conditional breakpoint support ([Issue 781](https://github.com/golang/vscode-go/issues/781)).
15+
* Debug Adapter logs all the environment variables passed to dlv when verbose logging is enabled.
16+
- Language Server Client: sends `gopls` config as LSP initialization options for correct workspace symbols computation ([CL 259138](https://go-review.googlesource.com/c/vscode-go/+/259138)).
17+
- Snippets: adds a placeholder for the `for` statement snippet ([Issue 734](https://github.com/golang/vscode-go/issues/734)).
18+
- Excludes `vendor` directories from `go.inferGopath` disable mechanism ([Issue 301](https://github.com/golang/vscode-go/issues/301)).
19+
- New `go.logging.level` setting allows extra logging to help debugging extension issues ([CL 256557](https://go-review.googlesource.com/c/vscode-go/+/256557)).
20+
- For Nightly extension users, `Go: Show Survey Config` and `Go: Reset Survey Config` commands are available.
21+
22+
### Fixes
23+
- Fixed the bug that caused the debug adapter to leave bogus null items in the map type variable presentation ([Issue 199](https://github.com/golang/vscode-go/issues/199)).
24+
- Fixed several debug adapter bugs that caused remote debug to hang ([Issue 740](https://github.com/golang/vscode-go/issues/740), [766](https://github.com/golang/vscode-go/issues/766), [761](https://github.com/golang/vscode-go/issues/761), [764](https://github.com/golang/vscode-go/issues/764)).
25+
- Restored the correct handling of language server configuration change when users opt for enabling language server and installing `gopls`. ([CL 258997](https://go-review.googlesource.com/c/vscode-go/+/258997)).
26+
- Fixed a diagnostics error visualization issue when multiple files with errors are open ([Issue 743](https://github.com/golang/vscode-go/issues/743)).
27+
- Changed the dependency tool installation to use the `go` command chosen from the current `GOROOT/bin`. This helps avoid using a different version of `go` command for `asdf` or `direnv` users ([Issue 757](https://github.com/golang/vscode-go/issues/757)).
28+
29+
### Documentation
30+
- Documented the current limitation of symlink support in debugging ([CL 257204](https://go-review.googlesource.com/c/vscode-go/+/257204)), improved the instruction for CLI application debugging ([CL 259677](https://go-review.googlesource.com/c/vscode-go/+/259677)), and fixed syntax errors in example task configuration snippets ([CL 259077](https://go-review.googlesource.com/c/vscode-go/+/259077)).
31+
32+
### Code Health
33+
- Added an initial set of tests for debug adapters ([Issue 137](https://github.com/golang/vscode-go/issues/137)). We will keep working to improve our test coverage.
34+
35+
### Thanks
36+
37+
Thank you for your contributions, @suzmue, @vologab, @amitlevy21, @danielhelfand, @egonk, @quoctruong, @polinasok, @pjweinbgo, @stamblerre, @hyangah!
38+
139
## v0.17.2 - 29th Sep, 2020
240

341
### Fixes

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ You should immediately see a prompt in the bottom-right corner of your screen ti
6161

6262
If you see an error that looks like `command Go: Install/Update Tools not found`, it means that the extension has failed to activate and register its commands. Please uninstall and then reinstall the extension.
6363

64+
When the extension is active, you should see the [Go status bar](docs/ui.md) in the bottom left corner.
65+
6466
### Start coding
6567

6668
You're ready to Go!

docs/commands.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,11 @@ Restart the running instance of the language server
190190
### `Go: Choose Go Environment`
191191

192192
Choose a different Go version or binary for this project. (WIP)
193+
194+
### `Go: Show Survey Configuration`
195+
196+
Show the current Go survey configuration
197+
198+
### `Go: Reset Survey Configuration`
199+
200+
Reset the current Go survey configuration history

docs/go-version.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/images/gopls.png

7.76 KB
Loading

docs/images/selectGoVersion.png

253 KB
Loading

docs/images/statusbarmenu.png

185 KB
Loading

docs/ui.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Extension UI
2+
3+
## Using The Go Status Bar
4+
5+
The Go status bar appears in the lower left of the extension window. Clicking the Go status bar brings up a menu that provides easy access to see and update important information about your Go project. This includes information about the Go environment, the current Go version, the `gopls` trace, and about the current module.
6+
7+
<div style="text-align: center;"><img src="images/statusbarmenu.png" alt="vscode extension after Go status bar item is clicked" style="width:75%" > </div>
8+
9+
### Go Environment
10+
11+
The `Go Locate Configured Go Tools` command will display the configured GOPATH, GOROOT, tool locations and the results of `go env` in the output window.
12+
13+
### Managing Your Go Version
14+
15+
You can view the current Go version by looking at the status bar item in the bottom left corner of VS Code. Clicking this button and selecting `Choose Go Environment` will present you with a menu from which you can select any version of Go that exists in your $HOME/sdk directory or on <https://golang.org/dl>. This command is also available through the command pallette using `Go: Choose Go Environment`.
16+
17+
Previously, the `go.goroot` and `go.alternateTools` settings controlled the Go version used by VS Code Go. If you have configured these settings, they are no longer needed and should be deleted.
18+
19+
<div style="text-align: center;"><img src="images/selectGoVersion.png" alt="command pallete menu for selecting a new Go version" style="width:75%" > </div>
20+
21+
22+
The "Clear Selection" option resets your Go version to the one found first in either `go.alternateTools`, `go.goroot` or your PATH.
23+
24+
### Installing a New Go Version
25+
26+
After selecting any Go version that has not yet been installed (such as Go 1.14.6 in the screenshot above), the binary will be automatically installed in $HOME/sdk and put to use in your environment.
27+
28+
Once the download completes, VS Code Go will make use of this new Go version.
29+
30+
### Language Server Status
31+
32+
`gopls` is the official Go [language server](https://langserver.org/) developed by the Go team. It was developed in response to the release of [Go modules](docs/modules.md), and it is the recommended approach when working with [Go modules](docs/modules.md) in VS Code.
33+
34+
When `gopls` is enabled, :zap: is displayed next to the Go version in the status bar and the `gopls` version is displayed in the menu.
35+
36+
<div style="text-align: center;"><img src="images/gopls.png" alt="command pallete menu for selecting a new Go version" style="width:100px" > </div>
37+
38+
Selecting `Open 'gopls' trace` will open the trace of the `gopls` server in the output window. Please include this trace when filing an issue related to the extension and `gopls` is enabled.
39+
40+
### Modules Status
41+
42+
When modules are enabled for the file you have open, you can navigate to the `go.mod` file for the project using the menu. If you do not see the `Open go.mod` item, then the extension does not think the file you have open belongs to a module.
43+
44+
More information about [using Go modules](https://blog.golang.org/using-go-modules) is available on the Go blog.
45+

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
{
112112
"id": "go.mod",
113113
"extensions": [
114-
"go.mod"
114+
"go.mod",
115+
"gopls.mod"
115116
],
116117
"aliases": [
117118
"Go Module File"
@@ -365,6 +366,16 @@
365366
"command": "go.environment.choose",
366367
"title": "Go: Choose Go Environment",
367368
"description": "Choose a different Go version or binary for this project. (WIP)"
369+
},
370+
{
371+
"command": "go.survey.showConfig",
372+
"title": "Go: Show Survey Configuration",
373+
"description": "Show the current Go survey configuration"
374+
},
375+
{
376+
"command": "go.survey.resetConfig",
377+
"title": "Go: Reset Survey Configuration",
378+
"description": "Reset the current Go survey configuration history"
368379
}
369380
],
370381
"breakpoints": [

src/debugAdapter/goDebug.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
getCurrentGoWorkspaceFromGOPATH,
3939
getInferredGopath,
4040
} from '../utils/pathUtils';
41-
import {killProcessTree} from '../utils/processUtils';
41+
import { killProcessTree } from '../utils/processUtils';
4242

4343
const fsAccess = util.promisify(fs.access);
4444
const fsUnlink = util.promisify(fs.unlink);
@@ -473,7 +473,11 @@ export class Delve {
473473
log(`Using GOPATH: ${env['GOPATH']}`);
474474
log(`Using GOROOT: ${this.goroot}`);
475475
log(`Using PATH: ${env['PATH']}`);
476-
476+
if (launchArgs.trace === 'verbose') {
477+
Object.keys(env).forEach((key) => {
478+
log(' export ' + key + '="' + env[key] + '"');
479+
});
480+
}
477481
if (!!launchArgs.noDebug) {
478482
if (mode === 'debug') {
479483
this.noDebug = true;
@@ -529,8 +533,7 @@ export class Delve {
529533

530534
if (!existsSync(launchArgs.dlvToolPath)) {
531535
log(
532-
`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${
533-
env['GOPATH'] ? ', ' + env['GOPATH'] : ''
536+
`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${env['GOPATH'] ? ', ' + env['GOPATH'] : ''
534537
} or ${envPath}`
535538
);
536539
return reject(

0 commit comments

Comments
 (0)