Skip to content

Commit 672e67b

Browse files
authored
Merge branch 'master' into feat-generate_methods_using_codeaction
2 parents 3623adc + fa820d4 commit 672e67b

23 files changed

+1280
-84
lines changed

.github/workflows/release-nightly.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Go
3030
uses: actions/setup-go@v3
3131
with:
32-
go-version: '1.19'
32+
go-version: '1.20'
3333
check-latest: true
3434
cache: true
3535

@@ -39,6 +39,13 @@ jobs:
3939
- name: Prepare Release
4040
run: build/all.bash prepare_nightly
4141

42+
- name: Version
43+
run: |
44+
echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV
45+
46+
- name: Package Extension
47+
run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix"
48+
4249
- name: Compile
4350
run: npm run vscode:prepublish
4451

@@ -62,8 +69,7 @@ jobs:
6269

6370
- name: Publish
6471
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
65-
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
66-
with:
67-
args: "publish -p $VSCE_TOKEN"
68-
env:
69-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
72+
run: |
73+
echo "publishing ${{ env.VSCODE_GO_VERSION }}"
74+
ls *.vsix
75+
npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"

.github/workflows/release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ jobs:
8080
npm ci
8181
npm run vscode:prepublish
8282
83-
- name: package
84-
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
85-
with:
86-
args: "package"
83+
- name: package extension
84+
run: npx vsce package -o "./go-${{ env.EXT_VERSION }}.vsix"
8785

8886
- name: create release
8987
id: create_release
@@ -108,10 +106,6 @@ jobs:
108106

109107
- name: publish
110108
if: env.EXT_ISPREVIEW != 1 && github.repository == 'golang/vscode-go'
111-
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
112-
with:
113-
args: "publish -p $VSCE_TOKEN"
114-
env:
115-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
109+
run: npx vsce publish -i "./go-${{ env.EXT_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"
116110

117111
# TODO: check if the commit is in green state. (test-long.yml results)

.github/workflows/test-long-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
1919
version: ['stable', 'insiders']
20-
go: ['1.17', '1.18', '1.19', '1.20.0-rc.1']
20+
go: ['1.17', '1.18', '1.19', '1.20']
2121

2222
steps:
2323
- name: Clone repository

.github/workflows/test-long.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-latest] # TODO: reenable macos-latest
1818
version: ['stable']
19-
go: ['1.17', '1.18', '1.19', '1.20.0-rc.1']
19+
go: ['1.17', '1.18', '1.19', '1.20']
2020

2121
steps:
2222
- name: Clone repository

.github/workflows/test-smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup Go
3131
uses: actions/setup-go@v3
3232
with:
33-
go-version: '1.19'
33+
go-version: '1.20'
3434
check-latest: true
3535
cache: true
3636

.github/workflows/wiki.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup Go
3636
uses: actions/setup-go@v3
3737
with:
38-
go-version: '1.19'
38+
go-version: '1.20'
3939
check-latest: true
4040
cache: true
4141
cache-dependency-path: '**/go.sum'

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## v0.38.0 - 23 Feb, 2023
2+
3+
This release adds default `go` tasks to help build and test your Go projects.
4+
5+
A list of all issues and changes can be found in the [v0.38.0 milestone](https://github.com/golang/vscode-go/milestone/50) and [commit history](https://github.com/golang/vscode-go/compare/v0.37.1...v0.38.0).
6+
7+
### Changes
8+
- Added default go task provider ([Issue 194](https://github.com/golang/vscode-go/issues/194)) <!-- CL 467697 -->
9+
- Updated pinned golangci-lint version to fix memory leak issue with Go 1.20 ([Issue 2654](https://github.com/golang/vscode-go/issues/2654))
10+
- gopls releases will now have a staged rollout in VS Code ([CL 468497](http://go.dev/cl/468497)) <!-- CL 468497 -->
11+
- Added extension keywords to make this extension easier to find in the VS Code Extension Marketplace ([Issue 2657](https://github.com/golang/vscode-go/issues/2657)) <!-- CL 467698 -->
12+
- Deleted the broken references codelens code ([Issue 2519](https://github.com/golang/vscode-go/issues/2519)) <!-- CL 464098 -->
13+
- Added support to handle missing variables in legacy debug adapter gracefully ([Issue 2397](https://github.com/golang/vscode-go/issues/2397)) <!-- CL 462289 -->
14+
15+
### Development process updates
16+
- Upgraded esbuild to support s390x ([Issue 2668](https://github.com/golang/vscode-go/issues/2668)) <!-- CL 469915 -->
17+
- Use --profile-temp for testing with clean env ([Issue 2458](https://github.com/golang/vscode-go/issues/2458)) <!-- CL 468496 -->
18+
19+
### Thanks
20+
21+
Thank you for your contribution, @ankon, @hyangah, @jamalc, and @suzmue!
22+
123
## v0.37.1 - 17 Jan, 2023
224

325
### Fixes

docs/debugging.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

docs/settings.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ Default:
456456

457457
Prompt for surveys, including the gopls survey and the Go developer survey.
458458

459+
Default: `true`
460+
### `go.tasks.provideDefault`
461+
462+
enable the default go build/test task provider.
463+
459464
Default: `true`
460465
### `go.terminal.activateEnvironment`
461466

0 commit comments

Comments
 (0)