@@ -10,25 +10,47 @@ version of gopls to support Go 1.23. To install it, run:
10
10
11
11
## New support policy; end of support for Go 1.19 and Go 1.20
12
12
13
- This is the last release of gopls that may be built and used with Go 1.19 or Go
13
+ ** TL;DR: We are narrowing gopls' support window, but this is unlikely to
14
+ affect you as long as you use at least Go 1.21 to build gopls. This doesn't
15
+ affect gopls' support for the code you are writing.**
16
+
17
+ This is the last release of gopls that may be built with Go 1.19 or Go 1.20,
18
+ and also the last to support integrating with go command versions 1.19 and
14
19
1.20. If built or used with either of these Go versions, it will display
15
20
a message advising the user to upgrade.
16
21
22
+ When using gopls, there are three versions to be aware of:
23
+ 1 . The _ gopls build go version_ : the version of Go used to build gopls.
24
+ 2 . The _ go command version_ : the version of the go list command executed by
25
+ gopls to load information about your workspace.
26
+ 3 . The _ language version_ : the version in the go directive of the current
27
+ file's enclosing go.mod file, which determines the file's Go language
28
+ semantics.
29
+
30
+ This gopls release, v0.16.0, is the final release to support Go 1.19 and Go
31
+ 1.20 as the _ gopls build go version_ or _ go command version_ . There is no
32
+ change to gopls' support for all _ language versions_ --in fact this support has
33
+ somewhat improved with the addition of the ` stdversion ` analyzer (see below).
34
+
17
35
Starting with
[email protected] , which will be released after Go 1.23.0 is released
18
- in August, installing gopls will require the latest version of the Go
19
- toolchain. Thanks to the [ forward compatibility] ( https://go.dev/blog/toolchain )
36
+ in August, gopls will only support the latest version of Go as the
37
+ _ gopls build go version_ .
38
+ However, thanks to the [ forward compatibility] ( https://go.dev/blog/toolchain )
20
39
added to Go 1.21, any necessary toolchain upgrade should be handled
21
- automatically for users of Go 1.21 or later. This restriction is for _ building_
22
- gopls only -- we will continue to support command line integration with the
23
- last three major Go versions. Nonetheless, this is fewer than our previous policy
24
- of gopls supporting the last four major Go versions of installed toolchains.
40
+ automatically for users of Go 1.21 or later, just like any other dependency.
41
+ Additionally, we are reducing our _ go command version_ support window from
42
+ 4 versions to 3. Note that this means if you have at least Go 1.21 installed on
43
+ your system, you should still be able to
` go install ` and use
[email protected] .
44
+
45
+ We have no plans to ever change our _ language version_ support: we expect that
46
+ gopls will always support developing programs that target _ any_ Go version.
25
47
26
- See the newly updated
48
+ By focusing on building gopls with the latest Go version, we can significantly
49
+ reduce our maintenance burden and help improve the stability of future gopls
50
+ releases. See the newly updated
27
51
[ support policy] ( https://github.com/golang/tools/tree/master/gopls#support-policy )
28
- for details. We expect that this change will significantly reduce our
29
- maintenance burden, and will help improve the stability of future gopls
30
- releases. Please comment on [ issue #65917 ] ( https://go.dev/issue/65917 ) if you
31
- have concerns about this change.
52
+ for details. Please comment on [ issue #65917 ] ( https://go.dev/issue/65917 ) if
53
+ you have concerns about this change.
32
54
33
55
## Configuration Changes
34
56
@@ -177,6 +199,17 @@ func (s S) set(x int) {
177
199
}
178
200
```
179
201
202
+ ### ` stdversion ` analyzer
203
+
204
+ The new
205
+ [ ` stdversion ` ] ( https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/stdversion )
206
+ analyzer warns about the use of too-new standard library symbols based on the
207
+ version of the ` go ` directive in your ` go.mod ` file. This improves our support
208
+ for older _ language versions_ (see above), even when gopls is built with
209
+ a recent Go version.
210
+
211
+ TODO: add a screenshot demonstrating the new diagnostics
212
+
180
213
### Two more vet analyzers
181
214
182
215
The [ framepointer] ( https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/framepointer )
0 commit comments