1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00
go/internal/lsp/cmd
Rob Findley b4fe758a9b internal/lsp/source: don't allow mutating DefaultOptions
DefaultOptions was a value type, but held map values. This CL changes it
to a function that returns an Options value that has new instances of
all reference types. It would be better if this function returned a
pointer, but that change ended up being too large. I will need to
refactor handling of options later anyway, in order to support sessions
with differing options for golang.org/issues/34111.

This fixes a race in internal/lsp/tests: internal/hooks/analysis.go
mutates the Analyzers map.

See for example the trybots result at:
https://storage.googleapis.com/go-build-log/0d34f5f0/linux-amd64-race_4ecdf9c8.log

Change-Id: I41be450b590a3f3104ac9a1cb9cb312ea3ff7ff4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/217077
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-01-31 15:48:08 +00:00
..
test internal/lsp: add tests for references includeDeclaration setting 2020-01-23 01:39:50 +00:00
capabilities_test.go internal/lsp: remove the Context argument from NewSession 2020-01-21 23:07:03 +00:00
check.go internal/lsp: remove boolean for publishEmpty in diagnostics 2020-01-15 22:25:09 +00:00
cmd_test.go internal/lsp: do not invoke the Go command when checking common errors 2020-01-17 21:23:25 +00:00
cmd.go internal/lsp/source: don't allow mutating DefaultOptions 2020-01-31 15:48:08 +00:00
definition.go internal/lsp: improve link in documentation on hover 2019-12-12 22:39:21 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
folding_range.go tools/gopls: add cmd support for folding_ranges 2019-11-12 00:55:09 +00:00
format.go internal/lsp: address staticcheck warnings 2019-10-04 02:16:23 +00:00
highlight.go internal/lsp: add control flow highlighting for functions 2019-12-02 19:01:20 +00:00
implementation.go tools/gopls: add cmd support for implementation 2019-11-25 20:27:09 +00:00
imports.go internal/lsp: fix the return type of CodeAction() 2019-11-19 17:57:05 +00:00
info.go tools/internal/lsp/cmd: fix documentation 2019-12-30 18:10:14 +00:00
links.go tools/gopls: add command line support for links 2019-11-01 17:18:15 +00:00
query.go internal/lsp: improve link in documentation on hover 2019-12-12 22:39:21 +00:00
references.go internal/lsp: propagate errors from find references 2020-01-09 21:23:09 +00:00
rename.go internal/lsp: use span.URI constructor everywhere 2020-01-31 00:08:51 +00:00
serve_test.go internal/lsp/cmd: add a test for client logging 2020-01-22 21:55:43 +00:00
serve.go internal/lsp: remove the Context argument from NewSession 2020-01-21 23:07:03 +00:00
signature.go tools/gopls: add cmd support for signature 2019-10-31 22:07:37 +00:00
suggested_fix.go internal/lsp: diagnose the snapshot on every text synchronization event 2020-01-15 23:07:48 +00:00
symbols.go internal/lsp/cmd: fix documentation 2020-01-02 17:13:01 +00:00