Skip to content

Commit 2e23bf0

Browse files
committed
[release] prepare v0.39.0 release
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
2 parents 41b5c2a + 0864ab0 commit 2e23bf0

37 files changed

+660
-314
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff 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).
20+
- Third-party go tools dependencies: use [email protected] and [email protected] and install [email protected] when building with go1.18 or older.
21+
22+
### Delopment process updates
23+
- 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))
27+
- Added advanced [semantic syntax highlighting options](https://github.com/golang/vscode-go/wiki/features#syntax-highlighting). ([Issue 2682](https://github.com/golang/vscode-go/issues/2682))
28+
29+
### Thanks
30+
- Thank you for your contribution, @fflewddur, @ZekeLu, @cuining, @weikanglim, @niklaskorz, @xmmak, @jamalc, @suzmue, @hyangah!
31+
132
## v0.38.0 - 23 Feb, 2023
233

334
This release adds default `go` tasks to help build and test your Go projects.

build/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ COPY --from=gobuilder /usr/local/go /usr/local/go
2121
ENV PATH /go/bin:/usr/local/go/bin:${PATH}
2222
ENV DEBIAN_FRONTEND noninteractive
2323

24+
# Force npm to prefer ipv4 - the vm we are using doesn't yet support ipv6.
25+
# TODO(hyangah): remove this when the platform works with ipv6.
26+
ENV NODE_OPTIONS --dns-result-order=ipv4first
27+
2428
RUN apt-get -qq update && apt-get install -qq -y libnss3 libgtk-3-dev libxss1 libasound2 xvfb libsecret-1-0 jq > /dev/null
25-
RUN npm install -g typescript vsce
29+
RUN npm install -g typescript @vscode/vsce
2630

2731
USER node
2832
WORKDIR /workspace

build/all.bash

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ setup_virtual_display() {
3535

3636
go_binaries_info() {
3737
echo "**** Go version ****"
38-
which go
3938
go version
40-
echo "**** Gopls version ****"
41-
go version -m "$(which gopls)"
4239
}
4340

4441
run_test() {
@@ -63,6 +60,8 @@ run_test() {
6360

6461

6562
run_test_in_docker() {
63+
which npm && npm version || echo "no npm"
64+
which go && go version || echo "no go"
6665
echo "**** Building the docker image ***"
6766
docker build -t vscode-test-env ${GOVERSION:+ --build-arg GOVERSION="${GOVERSION}"} -f ./build/Dockerfile .
6867

docs/debugging.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ Here is the list of attributes specific to Go debugging.
441441
<!-- SETTINGS BEGIN -->
442442
| Property | Launch | Attach |
443443
| --- | --- | --- |
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> |
445445
| `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/> |
446446
| `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>|
447447
| `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
492492
vscode under the linked folder `/link/to/helloWorld`, you can add the following
493493
to your config to set breakpoints in the files in `/link/to/helloWorld`:
494494

495-
```
495+
```json
496496
{
497497
"name": "Launch with symlinks",
498498
"type": "go",
499499
"request": "launch",
500500
"mode": "debug",
501501
"program": "/path/to/actual/helloWorld",
502502
"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+
]
508508
}
509509
```
510510

@@ -843,7 +843,7 @@ Connect to it with a remote attach configuration in your `launch.json`:
843843
"port": 12345,
844844
"host": "127.0.0.1", // can skip for localhost
845845
"substitutePath": [
846-
{ "from": ${workspaceFolder}, "to": "/path/to/remote/workspace" },
846+
{ "from": "${workspaceFolder}", "to": "/path/to/remote/workspace" },
847847
...
848848
]
849849
}
@@ -1013,6 +1013,49 @@ culprits are remote debugging where the program is built in the remote location,
10131013
use of symbolic links, or use of `-trimpath` build flags. In this case,
10141014
configure the `substitutePath` attribute in your launch configuration.
10151015

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+
10161059
### Debug sessions started with the "debug test" CodeLens or the test UI does not use my `launch.json` configuration
10171060

10181061
The "debug test" CodeLens and the [test UI](features.md#test-and-benchmark) do

docs/features.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,18 @@ Quickly toggle between a file and its corresponding test file by using the [`Go:
112112

113113
The default syntax highlighting for Go files is implemented in Visual Studio Code using TextMate grammar, not by this extension.
114114

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
125+
}
126+
```
116127

117128
### Go template syntax highlighting
118129

0 commit comments

Comments
 (0)