You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0864ab0 CHANGELOG.md: add note for v0.39.0 release
99f78ff package.json: add go.showWelcome
47b9e02 src/goInstallTools: report when go.toolsManagement.go is not executable
50e2b64 package.json: remove go.languageServerExperimentalFeatures setting
97f0627 src/goMain.ts: show notification about go.useLanguageServer
0b6803b package.json: add deprecation note for legacy tools settings
df36d6f src/goToolsInformation.ts: update gopls version and unpin golangci-lint
03cf976 src/pickProcess: show error when the process picker is hidden
9ae57e8 docs/debbugging.md: fix the format of an example launch.json
052e72b package.json: update vscode-languageclient to 8.1.0
93ce48a src/goSurvey: use go.dev/s/ link for the feedback survey
e0d7ae9 docs/debugging.md: update doc to reflect changes in cl/495816
df47423 package.json: update launch args schema
69fd83a docs: update settings to sync with [email protected]9702bc9 tools/allTools.ts.in: update 3rd party tools' pinned versions
9ea51b0 package.json: npm audit fix
7d689fc src/goDebugConfiguration.ts: add support for `string` typed `args`
0755de9 don't cache environment PATH at the module level
9547119 docs: update gopls settings (v0.12.0-pre.1)
9264236 build: update docker to fix kokoro builder
fa820d4 docs/debugging.md: add tips for debugging with -trimpath
6aaa26a add missing quotes
7d97ee1 package.json: prepare branch for 0.39.0 dev work
5ffadd3 docs: mention advanced semantic token options
72249dc .github/workflows: fix release.yml to use npx vsce for packaging
179f226 .github/workflows: adjust release nightly to use npx vsce
d7419f4 src/goTools: install [email protected] when building with go1.18
Change-Id: I743833b82a276fcb2d697f97eb41740e7483ed00
Copy file name to clipboardExpand all lines: CHANGELOG.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,34 @@
1
+
## v0.39.0 - 12 Jun, 2023
2
+
3
+
We are in the process of removing legacy language features that were replaced by `gopls` since early 2021. The versions released after September 2023 will no longer offer features like code completion, navigation, documentation, formatting, and refactoring if the language server is disabled. In this release, we are showing deprecation notification messages if you are using the legacy language features. ([Issue 2799](https://github.com/golang/vscode-go/issues/2799))
4
+
5
+
A list of all issues and changes can be found in the [v0.39.0 milestone](https://github.com/golang/vscode-go/milestone/55) and [commit history](https://github.com/golang/vscode-go/compare/v0.39.0...v0.38.0).
6
+
7
+
### Changes
8
+
- Added the [`go.showWelcome`](https://github.com/golang/vscode-go/wiki/settings#goshowwelcome) setting that controls whether to show the Welcome page. ([PR 2704](https://github.com/golang/vscode-go/pull/2704)) <!-- CL 501208 -->
9
+
- Report when `go.toolsManagement.go` setting is invalid and ignored. ([Issue 2753](https://github.com/golang/vscode-go/issues/2753)) <!-- CL 501056 -->
10
+
- Removed `go.languageServerExperimentalFeatures` setting which was deprecated in v0.21.0. ([Issue 1109](https://github.com/golang/vscode-go/issue/1109)) <!-- CL 501199 -->
11
+
- Deprecated settings that affect only legacy language features and tools. They will be removed in the release after September 2023. ([Issue 2799](https://github.com/golang/vscode-go/issues/2799)) <!-- CL 501206 -->
12
+
-`"Go: Update/Install Tools"` will install the latest version of `golangci-lint` instead of a vetted, pinned version. The extension chose to pin the versions of third-party go tools it installs in order to manage version skew and reduce security risks. However, `golangci-lint` is frequently released and its community is active enough to handle compatibility/security issues. We decided to install the latest version by default. ([Issue 2763](https://github.com/golang/vscode-go/issues/2763), [2485](https://github.com/golang/vscode-go/issues/2485))
13
+
14
+
- Debug: show error when the process picker is hidden ([CL 499601](https://go.dev/cl/499601)). To learn more about the process picker in debug, see [Launch.json "processId" documentation](https://github.com/golang/vscode-go/wiki/debugging#launchjson-attributes). <!-- CL 499601 -->
15
+
- Debug: `args` attribute now accepts a `string` typed value. The argument string is parsed into word arguments with rules similar to `bash` except that there is no shell expansion. This change allows to use vscode variables like `${input:args}`. ([Issue 2621](https://github.com/golang/vscode-go/issues/2621)) <!-- CL 469378 -->
16
+
- The extension no longer cache PATH environment variable, which helps interoperate with extensions that modify `PATH`. ([Issue 2617](https://github.com/golang/vscode-go/issues/2617)) <!-- CL 494555 -->
17
+
- Updated LSP to v3.17.3 and VS Code language client library to v8.1.0. This includes fixes for request ordering issues around full document sync and bugs around shutdown. <!-- CL 473157 -->
18
+
- Replaced the extension user survey link to https://go.dev/s/ide-hats-survey. ([CL 497536](https://go.dev/cl/497536)) <!-- CL 497536 -->
19
+
- Updated settings to sync with [[email protected]](https://go.dev/s/gopls-v0.12).
- Updated `@vscode/vsce` version to address the [xml2js prototype pollution vulnerability report](https://github.com/advisories/GHSA-776f-qx25-q3cc)<!-- CL 494997 -->
24
+
25
+
### Documentation
26
+
- Debugging documentation includes tips for debugging with `-trimpath`. ([Issue 2609](https://github.com/golang/vscode-go/issues/2609))
Copy file name to clipboardExpand all lines: docs/debugging.md
+51-8Lines changed: 51 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -441,7 +441,7 @@ Here is the list of attributes specific to Go debugging.
441
441
<!-- SETTINGS BEGIN -->
442
442
| Property | Launch | Attach |
443
443
| --- | --- | --- |
444
-
|`args`| Command line arguments passed to the debugged program.<br/> | <center>_n/a_</center> |
444
+
|`args`| Command line arguments passed to the debugged program.<br/>(Default: `[]`)<br/>| <center>_n/a_</center> |
445
445
|`asRoot`| (Experimental) Debug with elevated permissions (on Unix). It requires `integrated` or `external` console modes and is ignored in remote debugging.<br/>(Default: `false`)<br/> | (Experimental) Debug with elevated permissions (on Unix). This requires `integrated` or `external` console modes and is ignored in remote debugging.<br/>(Default: `false`)<br/> |
446
446
|`backend`| Backend used by delve. Maps to `dlv`'s `--backend` flag.<br/><p>Allowed Values: `"default"`, `"native"`, `"lldb"`, `"rr"`<br/> | <center>_same as Launch_</center>|
447
447
|`buildFlags`| Build flags, to be passed to the Go compiler. Maps to dlv's `--build-flags` flag.<br/>(Default: `""`)<br/> | <center>_n/a_</center> |
@@ -492,19 +492,19 @@ your project lives in `/path/to/actual/helloWorld`, but the project is open in
492
492
vscode under the linked folder `/link/to/helloWorld`, you can add the following
493
493
to your config to set breakpoints in the files in `/link/to/helloWorld`:
494
494
495
-
```
495
+
```json
496
496
{
497
497
"name": "Launch with symlinks",
498
498
"type": "go",
499
499
"request": "launch",
500
500
"mode": "debug",
501
501
"program": "/path/to/actual/helloWorld",
502
502
"substitutePath": [
503
-
{
504
-
"from": "/link/to/helloWorld",
505
-
"to": "/path/to/actual/helloWorld",
506
-
},
507
-
],
503
+
{
504
+
"from": "/link/to/helloWorld",
505
+
"to": "/path/to/actual/helloWorld"
506
+
}
507
+
]
508
508
}
509
509
```
510
510
@@ -843,7 +843,7 @@ Connect to it with a remote attach configuration in your `launch.json`:
@@ -1013,6 +1013,49 @@ culprits are remote debugging where the program is built in the remote location,
1013
1013
use of symbolic links, or use of `-trimpath` build flags. In this case,
1014
1014
configure the `substitutePath` attribute in your launch configuration.
1015
1015
1016
+
#### Trimpath tips
1017
+
1018
+
If you are using `-trimpath` to build your program, you need to add entries to substitute
1019
+
path to let the debugger know how to map the package paths that are compiled in the
1020
+
binary to the files that you are looking at in the editor.
1021
+
1022
+
Here are some tips for configuring substitutePath. This assumes that your program is using module mode, which is the default.
1023
+
1024
+
One rule that you will need will map your main module. The mapping will map `"from"` the file path to the directory containing the module, `"to"` the module path.
1025
+
1026
+
You will also need to create a similar mapping for all dependencies. These include modules
1027
+
in the module cache, vendored modules, and the standard library.
1028
+
1029
+
```json
1030
+
"substitutePath": [
1031
+
// Main module.
1032
+
{
1033
+
"from": "${workspaceFolder}",
1034
+
"to": "moduleName",
1035
+
},
1036
+
// Module cache paths.
1037
+
{
1038
+
"from": "${env:HOME}/go/pkg/mod/github.com",
1039
+
"to": "github.com",
1040
+
},
1041
+
{
1042
+
"from": "${env:HOME}/go/pkg/mod/golang.org",
1043
+
"to": "golang.org",
1044
+
},
1045
+
...
1046
+
// Standard library paths.
1047
+
// This rule should come last since the empty "to" will match every path.
1048
+
{ "from": "/path/to/local/goroot/pkg" , "to": ""}
1049
+
],
1050
+
```
1051
+
1052
+
Since rules are applied both from client to server and server to client,
1053
+
rules with an empty string will be applied to *all* paths that it sees, so even
1054
+
dependencies will be mapped to `"/path/to/module"`.
1055
+
1056
+
We plan to make this easier in the future. Progress can be tracked
1057
+
in the issue tracker [golang/vscode-go#1985](https://github.com/golang/vscode-go/issues/1985).
1058
+
1016
1059
### Debug sessions started with the "debug test" CodeLens or the test UI does not use my `launch.json` configuration
1017
1060
1018
1061
The "debug test" CodeLens and the [test UI](features.md#test-and-benchmark) do
Copy file name to clipboardExpand all lines: docs/features.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,18 @@ Quickly toggle between a file and its corresponding test file by using the [`Go:
112
112
113
113
The default syntax highlighting for Go files is implemented in Visual Studio Code using TextMate grammar, not by this extension.
114
114
115
-
If you are using `gopls`, you can enable [Semantic Highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide) for more accurate syntax highlighting based on semantic tokenization using `"gopls": { "ui.semanticTokens": true }`.
115
+
If you are using `gopls`, you can enable [Semantic Highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide) for more accurate syntax highlighting based on semantic tokenization using this setting:
116
+
117
+
```
118
+
"gopls": {
119
+
"ui.semanticTokens": true,
120
+
121
+
// you can optionally turn on these features for more colors
122
+
// see https://go.dev/issue/45753 and https://go.dev/issue/45792
123
+
"ui.noSemanticString": true, // delegates string syntax highlighting to vscode
124
+
"ui.noSemanticNumber": true, // delegates number syntax highlighting to vscode
0 commit comments