1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:34:51 -07:00
go/internal/lsp/cache
Rebecca Stambler c537a342dd internal/lsp: pass options by reference instead of by value
We were previously behaving as though the slice/map values in the
options struct could be modified directly. The options should be cloned
before modification. Also, convert any usage of source.Options to
*source.Options.

Fixes golang/go#39592

Change-Id: Ib39f668bca0fa1038162206bd7793fd2049af576
Reviewed-on: https://go-review.googlesource.com/c/tools/+/254558
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-09-16 22:53:23 +00:00
..
analysis.go internal/memoize: switch from GC-driven to explicit deletion 2020-08-10 19:02:17 +00:00
cache.go internal/lsp: pass options by reference instead of by value 2020-09-16 22:53:23 +00:00
check.go internal/lsp: enable multi-module workspace mode by default in tests 2020-09-15 20:16:39 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp/cache: fix -mod=mod for workspace module setups 2020-09-15 17:38:23 +00:00
mod_tidy.go internal/lsp/cache: automatically construct the workspace module 2020-09-11 04:00:25 +00:00
mod.go internal/lsp: enable multi-module workspace mode by default in tests 2020-09-15 20:16:39 +00:00
os_darwin.go internal/lsp: add a mutex around the view's options 2020-04-02 16:41:49 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse_test.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
parse.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
pkg.go internal/lsp: enable multi-module workspace mode by default in tests 2020-09-15 20:16:39 +00:00
session.go internal/lsp: pass options by reference instead of by value 2020-09-16 22:53:23 +00:00
snapshot.go internal/lsp: enable multi-module workspace mode by default in tests 2020-09-15 20:16:39 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
view.go internal/lsp: pass options by reference instead of by value 2020-09-16 22:53:23 +00:00