all: merge master (81c7dc4) into gopls-release-branch.0.9

Also add a replace to gopls/go.mod.

For golang/go#54294

Conflicts:

- gopls/go.mod
- gopls/go.sum

Merge List:

+ 2022-08-04 81c7dc4e4 internal/lsp: polish vulncheck progress messages
+ 2022-08-04 af2a0a816 internal/lsp: use exec.CommandContext when running vulncheck
+ 2022-08-04 3519aa25b internal/lsp/cmd: remove unused Env from pkgLoadConfig
+ 2022-08-04 6c27717f2 internal/lsp/mod/code_lens: add "run govulncheck" codelens
+ 2022-08-04 763f65c3d gopls/internal/regtest/misc: simplify shared edit tests
+ 2022-08-04 fc3b24a45 go/internal/gcimporter: rewrite interface receiver parameters
+ 2022-08-04 b5fd08821 internal/lsp/command: replace VulncheckArgs Dir with URI
+ 2022-08-04 99fd76f9c internal/lsp/cache: delete KnownMetadata.PkgFilesChanged
+ 2022-08-04 01c9ff053 internal/lsp/cache: invalid packages should not be workspace packages
+ 2022-08-04 bd68922a8 internal/lsp: new options to disable certain kinds of semantic tokens
+ 2022-08-04 bceee4b05 internal/lsp/command: let RunVulncheckExp call gopls vulncheck
+ 2022-08-04 3e0a5031e internal/lsp: use directoryFilters in import scanning
+ 2022-08-04 87f47bbfb gopls/internal/regtest/bench: refactor and improve benchmarks
+ 2022-08-03 8b9a1fbdf go/callgraph/vta: do not assume that recovers cannot be deferred
+ 2022-08-03 371fc67d3 go/tools: add check for time formats with 2006-02-01
+ 2022-08-03 d08f5dc9f gopls/internal/regtest: unskip all of TestModFileModification
+ 2022-08-03 ddb90ecd3 internal/lsp/cache: fix data races to view.options
+ 2022-08-02 0d04f65da internal/lsp: re-send diagnostics on file events
+ 2022-08-02 d025cced8 internal/lsp/source: don't crash requesting gc_details for an empty file
+ 2022-08-02 10cb4353f internal/lsp/regtest: improvements for shared execution modes
+ 2022-08-02 4d0b38345 internal/lsp/regtest: minor cleanup for magic regtest envvar
+ 2022-08-02 310ea71b7 gopls/internal/regtest: add a test that ignoring a file resolves errors
+ 2022-08-01 21861e6be gopls/internal/regtest/bench: put feature benchmarks in their own file
+ 2022-08-01 c7f11917c go/internal/gcimporter: set underlying types in proper order; flatten imports
+ 2022-08-01 bd3f52477 internal/lsp: rename all the package names in the renamed package
+ 2022-08-01 9f6568509 internal/lsp/source: enable the new diff with allExperiments
+ 2022-07-29 9580c84d5 internal/lsp: Check if user's editor support rename operation
+ 2022-07-29 f560bc877 internal/lsp/cache: don't set context cancellation as a critical err
+ 2022-07-28 8ea568798 internal/lsp/regtest: remove arbitrary timeout for closing the editor
+ 2022-07-28 d01bb2ff9 internal/lsp/source: document the handling of GOPRIVATE for linkTarget
+ 2022-07-28 98bfcd1be internal/memoize: fix race in Store.Promise
+ 2022-07-27 e02e98a03 internal/lsp/cache: allow network whenever reloading the workspace
+ 2022-07-27 b52794acc internal/lsp/cache: simplify snapshot.Clone reinitialization logic
+ 2022-07-27 f1bb5ca08 internal/lsp/cache: report a critical error when go.work is invalid
+ 2022-07-27 b3b5c13b2 internal/lsp/cache: invalidate packages with missing deps when files are added
+ 2022-07-26 39a4e3647 internal/lsp/regtest: only run /default tests with -short
+ 2022-07-26 f157068c1 internal/lsp/regtest: allow sharing memoized results across regtests
+ 2022-07-26 8ccb25c9a internal/lsp: treat struct tags as string type
+ 2022-07-26 6c8a6c409 internal/lsp: suppress parameter hint when argument matches parameter
+ 2022-07-26 c83f42da7 internal/lsp: update inlay hints documentation to include go snippets
+ 2022-07-26 8b47d4e18 all: update dependencies
+ 2022-07-26 76004542d gopls: update dependencies
+ 2022-07-25 2a6393fe5 internal/lsp: Refactor to share logic with rename
+ 2022-07-25 4375b29f4 cmd/auth/cookieauth: delete unreachable os.Exit
+ 2022-07-25 005c07ac5 gopls/internal/vulncheck: adjust logging
+ 2022-07-25 04bd08781 internal/lsp: enable fillstruct for generics
+ 2022-07-25 6ec939a61 internal/span: fix incorrect bounds check in ToOffset
+ 2022-07-25 178fdf98d gopls/internal/regtest: unskip Test_Issue38211
+ 2022-07-25 1cfe623eb gopls/internal/regtest: unskip TestQuickFixEmptyFiles
+ 2022-07-24 3d474c890 internal/lsp/diff: new diff implementation to replace go-diff
+ 2022-07-22 a2a24778b gopls/internal/regtest: externalize shouldLoad tracking
+ 2022-07-22 7b605f471 gopls/internal/vulncheck: pass go version to vulncheck config
+ 2022-07-22 126ef8f86 gopls/internal/govulncheck: sync x/vuln@b9a3ad9
+ 2022-07-22 a732e45cc gopls: update golang.org/x/vuln
+ 2022-07-22 980cbfeac A+C: delete AUTHORS and CONTRIBUTORS
+ 2022-07-20 ec1f92440 internal/lsp: add check for nil results to fillreturns
+ 2022-07-19 79f3242e4 godoc: support go1.19 doc comment syntax
+ 2022-07-18 2957e9da5 go/callgraph/vta: use types.IsInterface instead of our own isInterface
+ 2022-07-18 2eaea8659 go/callgraph/vta: do not include interface types during propagation
+ 2022-07-18 dc45e742f internal/lsp: Update FilterDisallow to support matching directories at arbitrary depth.
+ 2022-07-15 ce6ce7662 internal/lsp/regtest: increase the time allowed for shutdown
+ 2022-07-15 32129bf2c go/internal/gcimporter: adjust importer to match compiler importer
+ 2022-07-15 22d149443 internal/gcimporter: add support for reading unified IR export data
+ 2022-07-15 c3af7c2fa internal/lsp/cache: delete workspacePackageHandles (dead code)
+ 2022-07-15 1a4e02fee internal/lsp/analysis/unusedvariable: add analyzer
+ 2022-07-14 db8f89b39 internal/memoize: rename Handle to Promise
+ 2022-07-13 a7c53b59a internal/analysisinternal: move FindBestMatch to internal/lsp/fuzzy
+ 2022-07-13 9b6c01892 internal/lsp/cache: don't trim unexported struct fields
+ 2022-07-13 85173cc4b internal/lsp/cache: follow usual structure for packages, analysis maps
+ 2022-07-13 b2eae7626 internal/lsp/cache: simplify modwhy cache
+ 2022-07-13 dcb576d3b internal/lsp/cache: simplify modtidy
+ 2022-07-13 b230791f2 internal/lsp/cache: move PosTo{Decl,Field} out of cache
+ 2022-07-12 8730184ef internal/lsp/fake: retry spurious file lock errors on windows
+ 2022-07-12 459e2b88f internal/lsp/progress: actually close over Context in WorkDoneWriter
+ 2022-07-12 7c06b01db go/callgraph/vta: remove interprocedural flows for receiver objects
+ 2022-07-12 6e6f3131e internal/lsp/regtest: simplify, consolidate, and document settings
+ 2022-07-12 3db2cdc06 internal/lsp: wait for ongoing work to complete during server shutdown
+ 2022-07-12 a5adb0f2c internal/lsp/cache: use mod=readonly for process env funcs
+ 2022-07-12 a79ee0f0f Revert "Revert "internal/lsp/cache: don't pin a snapshot to view.importsState"
+ 2022-07-12 bc957ec62 internal/lsp/source: use token.File-agnostic positions to dedupe refs
+ 2022-07-11 b6e495100 Revert "internal/lsp/cache: don't pin a snapshot to view.importsState"
+ 2022-07-11 71dc5e295 internal/lsp/cache: make snapshot reference counting uniform
+ 2022-07-11 42457a544 internal/lsp/cache: don't pin a snapshot to view.importsState
+ 2022-07-08 d6c099e3c internal/memoize: document stateIdle, RefCounted
+ 2022-07-08 53ead67a9 internal/memoize: delete Generation and Bind
+ 2022-07-08 874617721 internal/lsp/cache: simplify ParseGo
+ 2022-07-08 9c2a5567e internal/lsp/cache: fail addPackageHandle if metadata is stale
+ 2022-07-07 1dfab61a4 internal/lsp/cache: use GetHandle not Bind for 5 URI-keyed maps
+ 2022-07-07 2aef121b8 internal/lsp: consolidate .go/go.mod link logic
+ 2022-07-07 8184d1ff7 internal/lsp/cache: use GetHandle not Bind in astCacheData
+ 2022-07-06 36430f4b3 internal/lsp/cache: use GetHandle not Bind for actions
+ 2022-07-06 b929f3bf4 internal/span: make NewRange accept File, not FileSet
+ 2022-07-06 d69bac6d8 internal/lsp/cache: cache isActiveLocked calculation across snapshots
+ 2022-07-05 afa4a9562 internal/lsp/cache: persist known subdirs
+ 2022-07-01 698251aaa internal/lsp/cache: sort Metadata.Deps, for determinism
+ 2022-07-01 f79f3aac1 internal/lsp/cache: clarify buildPackageHandle
+ 2022-07-01 e92a18fd1 internal/lsp/lsppos: reduce allocations in NewMapper
+ 2022-07-01 f487f3623 internal/lsp/source: reduce allocation in workspace-symbols
+ 2022-07-01 7b04e8b59 internal/persistent: no-op deletion from map does not allocate
+ 2022-07-01 f042799df internal/memoize: delete Bind(cleanup) hook
+ 2022-07-01 bec0cf16b internal/lsp/cache: avoid Handle mechanism for workspace dir
+ 2022-07-01 ffc70b9ac lsp/completion: fix ranking of *types.PkgName candidates
+ 2022-07-01 93bf1fcc7 gopls: add range over channel postfix completion
+ 2022-07-01 79fefdf61 internal/memoize: do not iterate all handles on generation destruction
+ 2022-07-01 fa4babcd9 internal/lsp/cache: use persistent map for storing packages in the snapshot

Change-Id: If2b0e078a3d689617090269ad9ba26edeafaa62c
diff --git a/codereview.cfg b/codereview.cfg
index 3f8b14b..b309710 100644
--- a/codereview.cfg
+++ b/codereview.cfg
@@ -1 +1,3 @@
 issuerepo: golang/go
+branch: gopls-release-branch.0.9
+parent-branch: master
diff --git a/gopls/go.mod b/gopls/go.mod
index 006bfe2..3fcbcb4 100644
--- a/gopls/go.mod
+++ b/gopls/go.mod
@@ -9,7 +9,7 @@
 	github.com/sergi/go-diff v1.1.0
 	golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
 	golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
-	golang.org/x/tools v0.1.11
+	golang.org/x/tools v0.1.12-0.20220713141851-7464a5a40219
 	golang.org/x/vuln v0.0.0-20220725105440-4151a5aca1df
 	honnef.co/go/tools v0.3.2
 	mvdan.cc/gofumpt v0.3.1
diff --git a/internal/lsp/debug/info.go b/internal/lsp/debug/info.go
index bcc2f4f..92e2571 100644
--- a/internal/lsp/debug/info.go
+++ b/internal/lsp/debug/info.go
@@ -29,7 +29,7 @@
 )
 
 // Version is a manually-updated mechanism for tracking versions.
-const Version = "master"
+const Version = "v0.9.1"
 
 // ServerVersion is the format used by gopls to report its version to the
 // client. This format is structured so that the client can parse it easily.
diff --git a/internal/lsp/diff/lcs/labels.go b/internal/lsp/diff/lcs/labels.go
index 0689f1e..39fe9f2 100644
--- a/internal/lsp/diff/lcs/labels.go
+++ b/internal/lsp/diff/lcs/labels.go
@@ -8,7 +8,8 @@
 	"fmt"
 )
 
-//  For each D, vec[D] has length D+1,
+//	For each D, vec[D] has length D+1,
+//
 // and the label for (D, k) is stored in vec[D][(D+k)/2].
 type label struct {
 	vec [][]int
diff --git a/internal/lsp/source/hover.go b/internal/lsp/source/hover.go
index b2524c4..c5af019 100644
--- a/internal/lsp/source/hover.go
+++ b/internal/lsp/source/hover.go
@@ -879,7 +879,7 @@
 // or Ellipsis.Elt, the field is returned, along with the innermost
 // enclosing Decl, which could be only loosely related---consider:
 //
-//    var decl = f(  func(field int) {}  )
+//	var decl = f(  func(field int) {}  )
 //
 // It returns (nil, nil) if no Field or Decl is found at pos.
 func FindDeclAndField(files []*ast.File, pos token.Pos) (decl ast.Decl, field *ast.Field) {