Skip to content

Commit

Permalink
Merge branch 'master' into feat-generate_methods_using_codeaction
Browse files Browse the repository at this point in the history
  • Loading branch information
sslime336 authored Mar 8, 2023
2 parents 3623adc + fa820d4 commit 672e67b
Show file tree
Hide file tree
Showing 23 changed files with 1,280 additions and 84 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.20'
check-latest: true
cache: true

Expand All @@ -39,6 +39,13 @@ jobs:
- name: Prepare Release
run: build/all.bash prepare_nightly

- name: Version
run: |
echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV
- name: Package Extension
run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix"

- name: Compile
run: npm run vscode:prepublish

Expand All @@ -62,8 +69,7 @@ jobs:

- name: Publish
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
run: |
echo "publishing ${{ env.VSCODE_GO_VERSION }}"
ls *.vsix
npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"
12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ jobs:
npm ci
npm run vscode:prepublish
- name: package
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
with:
args: "package"
- name: package extension
run: npx vsce package -o "./go-${{ env.EXT_VERSION }}.vsix"

- name: create release
id: create_release
Expand All @@ -108,10 +106,6 @@ jobs:

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

# TODO: check if the commit is in green state. (test-long.yml results)
2 changes: 1 addition & 1 deletion .github/workflows/test-long-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ['stable', 'insiders']
go: ['1.17', '1.18', '1.19', '1.20.0-rc.1']
go: ['1.17', '1.18', '1.19', '1.20']

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-long.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest] # TODO: reenable macos-latest
version: ['stable']
go: ['1.17', '1.18', '1.19', '1.20.0-rc.1']
go: ['1.17', '1.18', '1.19', '1.20']

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.20'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.20'
check-latest: true
cache: true
cache-dependency-path: '**/go.sum'
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## v0.38.0 - 23 Feb, 2023

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

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).

### Changes
- Added default go task provider ([Issue 194](https://github.com/golang/vscode-go/issues/194)) <!-- CL 467697 -->
- Updated pinned golangci-lint version to fix memory leak issue with Go 1.20 ([Issue 2654](https://github.com/golang/vscode-go/issues/2654))
- gopls releases will now have a staged rollout in VS Code ([CL 468497](http://go.dev/cl/468497)) <!-- CL 468497 -->
- 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 -->
- Deleted the broken references codelens code ([Issue 2519](https://github.com/golang/vscode-go/issues/2519)) <!-- CL 464098 -->
- Added support to handle missing variables in legacy debug adapter gracefully ([Issue 2397](https://github.com/golang/vscode-go/issues/2397)) <!-- CL 462289 -->

### Development process updates
- Upgraded esbuild to support s390x ([Issue 2668](https://github.com/golang/vscode-go/issues/2668)) <!-- CL 469915 -->
- Use --profile-temp for testing with clean env ([Issue 2458](https://github.com/golang/vscode-go/issues/2458)) <!-- CL 468496 -->

### Thanks

Thank you for your contribution, @ankon, @hyangah, @jamalc, and @suzmue!

## v0.37.1 - 17 Jan, 2023

### Fixes
Expand Down
45 changes: 44 additions & 1 deletion docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ Connect to it with a remote attach configuration in your `launch.json`:
"port": 12345,
"host": "127.0.0.1", // can skip for localhost
"substitutePath": [
{ "from": ${workspaceFolder}, "to": "/path/to/remote/workspace" },
{ "from": "${workspaceFolder}", "to": "/path/to/remote/workspace" },
...
]
}
Expand Down Expand Up @@ -1013,6 +1013,49 @@ culprits are remote debugging where the program is built in the remote location,
use of symbolic links, or use of `-trimpath` build flags. In this case,
configure the `substitutePath` attribute in your launch configuration.

#### Trimpath tips

If you are using `-trimpath` to build your program, you need to add entries to substitute
path to let the debugger know how to map the package paths that are compiled in the
binary to the files that you are looking at in the editor.

Here are some tips for configuring substitutePath. This assumes that your program is using module mode, which is the default.

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.

You will also need to create a similar mapping for all dependencies. These include modules
in the module cache, vendored modules, and the standard library.

```json
"substitutePath": [
// Main module.
{
"from": "${workspaceFolder}",
"to": "moduleName",
},
// Module cache paths.
{
"from": "${env:HOME}/go/pkg/mod/github.com",
"to": "github.com",
},
{
"from": "${env:HOME}/go/pkg/mod/golang.org",
"to": "golang.org",
},
...
// Standard library paths.
// This rule should come last since the empty "to" will match every path.
{ "from": "/path/to/local/goroot/pkg" , "to": ""}
],
```

Since rules are applied both from client to server and server to client,
rules with an empty string will be applied to *all* paths that it sees, so even
dependencies will be mapped to `"/path/to/module"`.

We plan to make this easier in the future. Progress can be tracked
in the issue tracker [golang/vscode-go#1985](https://github.com/golang/vscode-go/issues/1985).

### Debug sessions started with the "debug test" CodeLens or the test UI does not use my `launch.json` configuration

The "debug test" CodeLens and the [test UI](features.md#test-and-benchmark) do
Expand Down
13 changes: 12 additions & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,18 @@ Quickly toggle between a file and its corresponding test file by using the [`Go:

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

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 }`.
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:

```
"gopls": {
"ui.semanticTokens": true,
// you can optionally turn on these features for more colors
// see https://go.dev/issue/45753 and https://go.dev/issue/45792
"ui.noSemanticString": true, // delegates string syntax highlighting to vscode
"ui.noSemanticNumber": true, // delegates number syntax highlighting to vscode
}
```

### Go template syntax highlighting

Expand Down
5 changes: 5 additions & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ Default:

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

Default: `true`
### `go.tasks.provideDefault`

enable the default go build/test task provider.

Default: `true`
### `go.terminal.activateEnvironment`

Expand Down
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ module github.com/golang/vscode-go
go 1.16

require (
github.com/google/go-cmp v0.5.7
github.com/stamblerre/work-stats v0.0.0-20211013195910-92098c96a21a
golang.org/x/build v0.0.0-20211222221018-ee978b38c739
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
golang.org/x/text v0.3.7 // indirect
github.com/google/go-cmp v0.5.9
github.com/stamblerre/work-stats v0.0.0-20221215212512-f2f2cf51e506
golang.org/x/build v0.0.0-20230221151429-f03e733dd241
)
Loading

0 comments on commit 672e67b

Please sign in to comment.