Skip to content

Commit

Permalink
README.md: clarify supported go & tools versions
Browse files Browse the repository at this point in the history
Based on the clarified version support policy:

- Add github.com/golang/vscode-go/wiki/compatibility
to have the version compatibility matrix.

- Drop go1.20 from GH action workflows.

- Let extension/tools/installtools require go1.21+.

For #3411
For #3412

Change-Id: I10ffafa3234e691e9e27f84385aa68efa7db733f
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/616675
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
hyangah committed Sep 30, 2024
1 parent 25448e0 commit 825de6b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 8 deletions.
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.20', '1.21', '1.22', '1.23']
go: ['1.21', '1.22', '1.23']

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.20', '1.21', '1.22', '1.23']
go: ['1.21', '1.22', '1.23']

steps:
- name: Clone repository
Expand Down
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ provides rich language support for the
## Requirements

* Visual Studio Code 1.75 or newer (or editors compatible with VS Code 1.75+ APIs)
* Go 1.19 or newer.
* Go 1.21 or newer.

## Quick Start

Welcome! 👋🏻<br/>
Whether you are new to Go or an experienced Go developer, we hope this
extension fits your needs and enhances your development experience.

1. Install [Go](https://go.dev) 1.19 or newer if you haven't already.
1. Install [Go](https://go.dev) 1.21 or newer if you haven't already.

1. Install the [VS Code Go extension].

Expand Down Expand Up @@ -182,6 +182,30 @@ post series](https://research.swtch.com/telemetry-uses) contains many more.
Go telemetry is designed to be transparent and privacy-preserving. Learn more at
[https://go.dev/doc/telemetry](https://go.dev/doc/telemetry).

## Support Policy

The Go extension is maintained by engineers on the
[Go tools team](https://github.com/orgs/golang/teams/tools-team/members),
who actively monitor the [VS Code Go](https://github.com/golang/vscode-go/issues)
and the [Go](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls)
issue trackers.

We support only the latest stable and pre-release versions of the extension.

### Supported Go and tools

The Go extension follows the [Go Release Policy](https://go.dev/doc/devel/release.html#policy),
meaning that it _officially_ supports the two most recent major Go releases.
The Go team maintains _best-effort_ support for the last three major Go versions.

The Go extension relies on [tools](https://github.com/golang/vscode-go/wiki/tools)
like `gopls` and `dlv` for its core functionalities and they have their own release
policy and schedule. We test only against the latest versions of these tools.

In case you need to work with an older version of Go, please check
the [Compatibility] page and manually install the compatible version of
the extension and tools.

## Contributing

We welcome your contributions and thank you for working to improve the Go
Expand Down Expand Up @@ -211,11 +235,12 @@ conduct-related issue, please mail [email protected].
[IntelliSense]: https://github.com/golang/vscode-go/wiki/features#intellisense
[Code navigation]: https://github.com/golang/vscode-go/wiki/features#code-navigation
[Code editing]: https://github.com/golang/vscode-go/wiki/features#code-editing
[Compatibility]: https://github.com/golang/vscode-go/wiki/compatibility
[diagnostics]: https://github.com/golang/vscode-go/wiki/features#diagnostics
[testing]: https://github.com/golang/vscode-go/wiki/features#run-and-test-in-the-editor
[debugging]: https://github.com/golang/vscode-go/wiki/debugging#features
[full feature breakdown]: https://github.com/golang/vscode-go/wiki/features
[workspace documentation]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
[`Go: Install/Update Tools` command]: https://github.com/golang/vscode-go/wiki/commands#go-installupdate-tools
[Supported workspace layouts documentation]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md
[Workspace Folders]: https://code.visualstudio.com/docs/editor/multi-root-workspaces
[Workspace Folders]: https://code.visualstudio.com/docs/editor/multi-root-workspaces
18 changes: 18 additions & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

## Version Compatibility

The table below lists the *last* version of the extension
known to be compatible with old versions of Go, and the last versionof tools
compatible with it.

| Go version | Extension version | VS Code | Gopls | Delve |
| ---------- | ----------------- | ------- | --------- | ------------ |
| go1.20 | v0.42.1 | 1.75+ | v0.15.3 | v1.22.1 |
| go1.19 | v0.42.1 | 1.75+ | v0.15.3 | v1.21.2 |
| go1.18 | v0.41.3 | 1.75+ | v0.14.2 | v1.20.0 |
| go1.17 | v0.39.1 | 1.67+ | v0.11.0 | v1.9.1 |
| go1.16 | v0.39.1 | 1.67+ | v0.11.0 | v1.8.3 |

### References
* Gopls's [supported go versions](https://github.com/golang/tools/tree/master/gopls#supported-go-versions).
* Delve's [supported go versions](https://github.com/go-delve/delve/blob/master/pkg/goversion/compat.go).
6 changes: 3 additions & 3 deletions extension/tools/installtools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ var tools = []struct {
{"golang.org/x/tools/gopls", "", true, nil},
{"github.com/cweill/gotests/gotests", "", false, nil},
{"github.com/haya14busa/goplay/cmd/goplay", "", false, nil},
{"honnef.co/go/tools/cmd/staticcheck", "", false, []finalVersion{{18, "v0.3.3"}, {20, "v0.4.7"}}},
{"github.com/go-delve/delve/cmd/dlv", "", false, []finalVersion{{16, "v1.8.3"}, {17, "v1.9.1"}, {18, "v1.20.2"}, {20, "v1.22.1"}}},
{"honnef.co/go/tools/cmd/staticcheck", "", false, []finalVersion{{21, "v0.4.7"}}},
{"github.com/go-delve/delve/cmd/dlv", "", false, nil},
}

// pickVersion returns the version to install based on the supported
Expand All @@ -58,7 +58,7 @@ func main() {
if err != nil {
exitf("failed to find go version: %v", err)
}
if ver < 1 {
if ver < 21 {
exitf("unsupported go version: 1.%v", ver)
}

Expand Down

0 comments on commit 825de6b

Please sign in to comment.