Skip to content

Commit 03ebc2c

Browse files
committed
[gopls-release-branch.0.6] all: merge master into gopls-release-branch.0.6
42984c4 internal/lsp/regtest: run one quick fix at a time in TestUnknownRevision 19b1717 go.mod: upgrade to Go 1.17 a1fbb68 all: upgrade go.mod files to Go 1.16 062bf4e internal/lsp: make ShowDocument RPC available to gopls 3e17c62 internal/lsp: warn users who have built gopls with go-diff v1.2.0 def0263 gopls: clarify policy with respect to support for older Go versions 7a6108e internal/lsp: don't use ast.NewPackage to build builtin edbe9be internal/lsp/completion: indicate completion candidates that are deprecated 9b9633e internal/lsp/regtest: force GOPACKAGESDRIVER=off 291330a gopls/internal/regtest/modfile: set an explicit go version in the TestUnknownRevision modules aec1372 gopls/internal/regtest: unskip tests for golang/go#37098 28c1392 internal/lsp: don't call PackagesForFile on builtin.go 800adbe go/packages: enable TestIssue37098 for Go 1.17 and later 16b25d2 internal/lsp: print comments that would be lost during extract func 7c72a84 go/analysis/passes/fieldalignment: clarify reported diagnostics in docs 9ff8648 internal/lsp: add support for extracting non-nested returns d0768c9 internal/lsp/source/completion: suggest only valid package names 6397a11 internal/lsp/debug: splice in updated servers rather than overwrite 7b9993c internal/lsp/cmd: add a command-line command to start daemon debugging fe1c548 gopls/test: it is safe to ignore json unmarshalling errors 735ed62 gopls: tidy module e3dc99f cmd/guru: update referrers-json testdata to reflect new line numbering 3f1e724 cmd/guru: remove test assertions involving unsafe to fix the build cf354b6 internal/lsp/cache: improve snapshot clone perfomance 7657be6 gopls/doc: fix broken link 7c93484 internal/lsp: add a command to start the debug server 716a04c lsp/completion: fix postfix completions preceding assignments f74a6698 internal/lsp/cache: preallocate internal maps when cloning snapshots e435455 internal/lsp: introduce MemoryMode f7e8e24 internal/lsp: support Check For Upgrades in vendor mode a8e7c0c internal/lsp: move gopls/internal/regtest -> internal/lsp/regtest f946a15 passes/sigchanyzer: allow valid inlined unbuffered signal channel 4934781 lsp/completion: offer candidates converting arrays to slices b3e5b99 internal/lsp: update unsafe completion test for upcoming spec changes e74674a internal/lsp/protocol: latest version of LSP dbc8747 internal/lsp/semantic: avoid doing semantic tokens for large files a13dbf1 lsp/completion: omit deep completions into unimported package names 10909d8 internal/lsp/cache: remove type info trimming 1dce19d internal/lsp/cache: don't trim types.Info with staticcheck enabled 07295ca internal/lsp/cache: prune types.Info entries in slice literals 1a0c608 internal/lsp/protocol/typescript: update documentation and generated code fe50371 internal/lsp/source: fix Deref function for cyclic types cb5dc85 internal/lsp/cache: add a scheme for types error code links 799b682 gopls/internal/hooks: respect the default checks of the staticcheck tool d1362d7 internal/lsp/source: fix an infinite loop in Deref function 59a2b45 internal/lsp/source: update process of hover signature creation for type declarations 2140cce fix the argument of the goimports example ec686a2 all: upgrade all dependencies except for go-diff 0243799 gopls/internal/coverage: apply gofmt to the build tag syntax be791d0 internal/lsp/source: small fixes to directory filters Change-Id: If0eb9499020d2baab77f05523197adb95044705f
2 parents 3f06512 + 42984c4 commit 03ebc2c

File tree

130 files changed

+2396
-722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2396
-722
lines changed

cmd/guru/testdata/src/describe/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import (
1010
"lib"
1111
"nosuchpkg" // @describe badimport1 "nosuchpkg"
1212
nosuchpkg2 "nosuchpkg" // @describe badimport2 "nosuchpkg2"
13-
_ "unsafe" // @describe unsafe "unsafe"
13+
// The unsafe package changed in Go 1.17 with the addition of
14+
// unsafe.Add and unsafe.Slice. While we still support older versions
15+
// of Go, the test case below cannot be enabled.
16+
// _ "unsafe" // @describe unsafe "unsafe"
1417
)
1518

1619
var _ nosuchpkg.T

cmd/guru/testdata/src/describe/main.golden

-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import of package "nosuchpkg"
2020
-------- @describe badimport2 --------
2121
reference to package "nosuchpkg"
2222

23-
-------- @describe unsafe --------
24-
import of package "unsafe"
25-
builtin Alignof
26-
builtin Offsetof
27-
type Pointer unsafe.Pointer
28-
builtin Sizeof
29-
3023
-------- @describe type-ref-builtin --------
3124
reference to built-in type float64
3225

cmd/guru/testdata/src/referrers-json/main.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"package": "describe",
4444
"refs": [
4545
{
46-
"pos": "testdata/src/describe/main.go:92:8",
46+
"pos": "testdata/src/describe/main.go:95:8",
4747
"text": "\tvar _ lib.Outer // @describe lib-outer \"Outer\""
4848
}
4949
]

go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module golang.org/x/tools
22

3-
go 1.12
3+
go 1.17
44

55
require (
6-
github.com/yuin/goldmark v1.2.1
7-
golang.org/x/mod v0.4.1
8-
golang.org/x/net v0.0.0-20201021035429-f5854403a974
9-
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
10-
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
6+
github.com/yuin/goldmark v1.3.3
7+
golang.org/x/mod v0.4.2
8+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
9+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
10+
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57
1111
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
1212
)

go.sum

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=
2-
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
1+
github.com/yuin/goldmark v1.3.3 h1:37BdQwPx8VOSic8eDSWee6QL9mRpZRm9VJp/QugNrW0=
2+
github.com/yuin/goldmark v1.3.3/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
33
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
44
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
5-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
6-
golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY=
7-
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
5+
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
6+
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
87
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
98
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
10-
golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
11-
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
9+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
10+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
1211
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
13-
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
14-
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
12+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
13+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1514
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1615
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
17-
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
18-
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
19-
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
16+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
17+
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
18+
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A=
19+
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
20+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
2021
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
2122
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
2223
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

go/analysis/passes/fieldalignment/fieldalignment.go

+20-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package fieldalignment defines an Analyzer that detects structs that would take less
5+
// Package fieldalignment defines an Analyzer that detects structs that would use less
66
// memory if their fields were sorted.
77
package fieldalignment
88

@@ -20,10 +20,27 @@ import (
2020
"golang.org/x/tools/go/ast/inspector"
2121
)
2222

23-
const Doc = `find structs that would take less memory if their fields were sorted
23+
const Doc = `find structs that would use less memory if their fields were sorted
2424
25-
This analyzer find structs that can be rearranged to take less memory, and provides
25+
This analyzer find structs that can be rearranged to use less memory, and provides
2626
a suggested edit with the optimal order.
27+
28+
Note that there are two different diagnostics reported. One checks struct size,
29+
and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the
30+
object that the garbage collector has to potentially scan for pointers, for example:
31+
32+
struct { uint32; string }
33+
34+
have 16 pointer bytes because the garbage collector has to scan up through the string's
35+
inner pointer.
36+
37+
struct { string; *uint32 }
38+
39+
has 24 pointer bytes because it has to scan further through the *uint32.
40+
41+
struct { string; uint32 }
42+
43+
has 8 because it can stop immediately after the string pointer.
2744
`
2845

2946
var Analyzer = &analysis.Analyzer{

go/analysis/passes/sigchanyzer/sigchanyzer.go

+18
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ func run(pass *analysis.Pass) (interface{}, error) {
4949
chanDecl = decl
5050
}
5151
case *ast.CallExpr:
52+
// Only signal.Notify(make(chan os.Signal), os.Interrupt) is safe,
53+
// conservatively treate others as not safe, see golang/go#45043
54+
if isBuiltinMake(pass.TypesInfo, arg) {
55+
return
56+
}
5257
chanDecl = arg
5358
}
5459
if chanDecl == nil || len(chanDecl.Args) != 1 {
@@ -127,3 +132,16 @@ func findDecl(arg *ast.Ident) ast.Node {
127132
}
128133
return nil
129134
}
135+
136+
func isBuiltinMake(info *types.Info, call *ast.CallExpr) bool {
137+
typVal := info.Types[call.Fun]
138+
if !typVal.IsBuiltin() {
139+
return false
140+
}
141+
switch fun := call.Fun.(type) {
142+
case *ast.Ident:
143+
return info.ObjectOf(fun).Name() == "make"
144+
default:
145+
return false
146+
}
147+
}

go/analysis/passes/sigchanyzer/testdata/src/a/a.go

+16
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ func j() {
3636
f := signal.Notify
3737
f(c, os.Interrupt) // want "misuse of unbuffered os.Signal channel as argument to signal.Notify"
3838
}
39+
40+
func k() {
41+
signal.Notify(make(chan os.Signal), os.Interrupt) // ok
42+
}
43+
44+
func l() {
45+
signal.Notify(make(chan os.Signal, 1), os.Interrupt) // ok
46+
}
47+
48+
func m() {
49+
signal.Notify(make(chan ao.Signal, 1), os.Interrupt) // ok
50+
}
51+
52+
func n() {
53+
signal.Notify(make(chan ao.Signal), os.Interrupt) // ok
54+
}

go/analysis/passes/sigchanyzer/testdata/src/a/a.go.golden

+16
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ func j() {
3636
f := signal.Notify
3737
f(c, os.Interrupt) // want "misuse of unbuffered os.Signal channel as argument to signal.Notify"
3838
}
39+
40+
func k() {
41+
signal.Notify(make(chan os.Signal), os.Interrupt) // ok
42+
}
43+
44+
func l() {
45+
signal.Notify(make(chan os.Signal, 1), os.Interrupt) // ok
46+
}
47+
48+
func m() {
49+
signal.Notify(make(chan ao.Signal, 1), os.Interrupt) // ok
50+
}
51+
52+
func n() {
53+
signal.Notify(make(chan ao.Signal), os.Interrupt) // ok
54+
}

go/packages/packages_test.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,16 @@ func testIssue37098(t *testing.T, exporter packagestest.Exporter) {
23552355
// (*Package).CompiledGoFiles. This tests #37098, where using SWIG to
23562356
// causes C++ sources to be inadvertently included in
23572357
// (*Package).CompiledGoFiles.
2358-
t.Skip("Issue #37098: SWIG causes generated C++ sources in CompiledGoFiles")
2358+
2359+
// This is fixed in Go 1.17, but not earlier.
2360+
testenv.NeedsGo1Point(t, 17)
2361+
2362+
if _, err := exec.LookPath("swig"); err != nil {
2363+
t.Skip("skipping test: swig not available")
2364+
}
2365+
if _, err := exec.LookPath("g++"); err != nil {
2366+
t.Skip("skipping test: g++ not available")
2367+
}
23592368

23602369
// Create a fake package with an empty Go source, and a SWIG interface
23612370
// file.

gopls/README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,18 @@ If you are having issues with `gopls`, please follow the steps described in the
7272

7373
## Supported Go versions and build systems
7474

75-
`gopls` follows the
76-
[Go Release Policy](https://golang.org/doc/devel/release.html#policy),
77-
meaning that it officially supports the last 2 major Go releases. Though we
78-
try not to break older versions, we do not prioritize issues only affecting
79-
legacy Go releases.
75+
`gopls` follows the [Go Release
76+
Policy](https://golang.org/doc/devel/release.html#policy), meaning that it
77+
officially supports the last 2 major Go releases. Per
78+
[issue #39146](golang.org/issues/39146), we attempt to maintain best-effort
79+
support for the last 4 major Go releases, but this support extends only to not
80+
breaking the build and avoiding easily fixable regressions.
81+
82+
Our extended support is enforced via [continuous integration with older Go
83+
versions](doc/contributing.md#ci). This legacy Go CI may not block releases:
84+
test failures may be skipped rather than fixed. Furthermore, if a regression in
85+
an older Go version causes irreconcilable CI failures, we may drop support for
86+
that Go version in CI if it is 3 or 4 Go versions old.
8087

8188
`gopls` currently only supports the `go` command, so if you are using a
8289
different build system, `gopls` will not work well. Bazel support is currently

gopls/doc/analyzers.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,28 @@ of the second argument is not a pointer to a type implementing error.
119119

120120
## **fieldalignment**
121121

122-
find structs that would take less memory if their fields were sorted
122+
find structs that would use less memory if their fields were sorted
123123

124-
This analyzer find structs that can be rearranged to take less memory, and provides
124+
This analyzer find structs that can be rearranged to use less memory, and provides
125125
a suggested edit with the optimal order.
126126

127+
Note that there are two different diagnostics reported. One checks struct size,
128+
and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the
129+
object that the garbage collector has to potentially scan for pointers, for example:
130+
131+
struct { uint32; string }
132+
133+
have 16 pointer bytes because the garbage collector has to scan up through the string's
134+
inner pointer.
135+
136+
struct { string; *uint32 }
137+
138+
has 24 pointer bytes because it has to scan further through the *uint32.
139+
140+
struct { string; uint32 }
141+
142+
has 8 because it can stop immediately after the string pointer.
143+
127144

128145
**Disabled by default. Enable it by setting `"analyses": {"fieldalignment": true}`.**
129146

gopls/doc/commands.md

+26
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,32 @@ Args:
199199
}
200200
```
201201

202+
### ****
203+
Identifier: `gopls.start_debugging`
204+
205+
206+
207+
Args:
208+
209+
```
210+
{
211+
// Optional: the address (including port) for the debug server to listen on.
212+
// If not provided, the debug server will bind to "localhost:0", and the
213+
// full debug URL will be contained in the result.
214+
//
215+
// If there is more than one gopls instance along the serving path (i.e. you
216+
// are using a daemon), each gopls instance will attempt to start debugging.
217+
// If Addr specifies a port, only the daemon will be able to bind to that
218+
// port, and each intermediate gopls instance will fail to start debugging.
219+
// For this reason it is recommended not to specify a port (or equivalently,
220+
// to specify ":0").
221+
//
222+
// If the server was already debugging this field has no effect, and the
223+
// result will contain the previously configured debug URL(s).
224+
"Addr": string,
225+
}
226+
```
227+
202228
### **Run test(s) (legacy)**
203229
Identifier: `gopls.test`
204230

gopls/doc/contributing.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,15 @@ Jenkins-like Google infrastructure for running Dockerized tests. This allows us
9797
to run gopls tests in various environments that would be difficult to add to
9898
the TryBots. Notably, Kokoro runs tests on
9999
[older Go versions](../README.md#supported-go-versions) that are no longer supported
100-
by the TryBots.
100+
by the TryBots. Per that that policy, support for these older Go versions is
101+
best-effort, and test failures may be skipped rather than fixed.
102+
103+
Kokoro runs are triggered by the `Run-TryBot=1` label, just like TryBots, but
104+
unlike TryBots they do not automatically re-run if the "gopls-CI" result is
105+
removed in Gerrit. In order to force a new run, you must upload a new patch
106+
set. (Technically, Googlers can force a new run on an existing patch-set via an
107+
internal Kokoro dashboard, but unfortunately this ability can't be made more
108+
generally available).
101109

102110
## Debugging
103111

gopls/doc/settings.md

+21
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,33 @@ the last filter that applies to a path controls whether it is included.
6363
The path prefix can be empty, so an initial `-` excludes everything.
6464

6565
Examples:
66+
6667
Exclude node_modules: `-node_modules`
68+
6769
Include only project_a: `-` (exclude everything), `+project_a`
70+
6871
Include only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`
6972

7073
Default: `[]`.
7174

75+
#### **memoryMode** *enum*
76+
77+
**This setting is experimental and may be deleted.**
78+
79+
memoryMode controls the tradeoff `gopls` makes between memory usage and
80+
correctness.
81+
82+
Values other than `Normal` are untested and may break in surprising ways.
83+
84+
Must be one of:
85+
86+
* `"DegradeClosed"`: In DegradeClosed mode, `gopls` will collect less information about
87+
packages without open files. As a result, features like Find
88+
References and Rename will miss results in such packages.
89+
90+
* `"Normal"`
91+
Default: `"Normal"`.
92+
7293
#### **expandWorkspaceToModule** *bool*
7394

7495
**This setting is experimental and may be deleted.**

gopls/doc/vim.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ a helper function in Lua:
164164
lua <<EOF
165165
-- …
166166
167-
function goimports(timeoutms)
167+
function goimports(timeout_ms)
168168
local context = { source = { organizeImports = true } }
169169
vim.validate { context = { context, "t", true } }
170170

gopls/doc/workspace.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ As of Jan 2021, if you are working with multiple modules or nested modules, you
2323
will need to create a "workspace folder" for each module. This means that each
2424
module has its own scope, and features will not work across modules. We are
2525
currently working on addressing this limitation--see details about
26-
[experimental workspace module mode](#experimental-workspace-module-mode)
26+
[experimental workspace module mode](#workspace-module-experimental)
2727
below.
2828

2929
In VS Code, you can create a workspace folder by setting up a

gopls/go.mod

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
module golang.org/x/tools/gopls
22

3-
go 1.12
3+
go 1.16
44

55
require (
6+
github.com/google/go-cmp v0.5.5
67
github.com/jba/templatecheck v0.5.0
7-
github.com/sanity-io/litter v1.3.0
8+
github.com/sanity-io/litter v1.5.0
89
github.com/sergi/go-diff v1.1.0
9-
golang.org/x/mod v0.4.1
10-
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
10+
golang.org/x/mod v0.4.2
11+
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57
1112
golang.org/x/tools v0.1.1-0.20210408155258-593413344da1
12-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
1313
honnef.co/go/tools v0.1.3
1414
mvdan.cc/gofumpt v0.1.1
1515
mvdan.cc/xurls/v2 v2.2.0
1616
)
17+
18+
replace golang.org/x/tools => ../

0 commit comments

Comments
 (0)