1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:48:32 -06:00
go/internal/lsp/source
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
..
comment_test.go internal/lsp: convert comments to markdown before sending to client 2019-10-04 18:35:38 +00:00
comment.go internal/lsp: convert comments to markdown before sending to client 2019-10-04 18:35:38 +00:00
completion_builtin.go internal/lsp: fix active parameter for incomplete parentheses 2020-01-27 19:24:44 +00:00
completion_format.go internal/lsp: return context cancellation from LookupBuiltin 2020-01-27 18:55:29 +00:00
completion_keywords.go internal/lsp: sort by label after score 2019-12-30 21:11:21 +00:00
completion_labels.go internal/lsp: sort by label after score 2019-12-30 21:11:21 +00:00
completion_literal.go internal/lsp/source: rename "typeInference" to "candidateInference" 2020-01-21 20:43:48 +00:00
completion_snippet.go internal/lsp: merge completion options into source.Options 2020-01-13 20:09:44 +00:00
completion.go internal/lsp: fix active parameter for incomplete parentheses 2020-01-27 19:24:44 +00:00
deep_completion.go internal/lsp: merge completion options into source.Options 2020-01-13 20:09:44 +00:00
diagnostics.go internal/lsp/source: check cancellation before analysis 2020-01-29 21:19:39 +00:00
errors.go internal/lsp: remove the checkErrors command in internal/lsp/source 2020-01-24 21:19:55 +00:00
folding_range.go internal/lsp: eliminate source.File type and move GetFile to snapshot 2019-12-19 20:51:25 +00:00
format_test.go internal/lsp/source: trim file very carefully 2020-01-17 20:34:13 +00:00
format.go internal/lsp/source: trim file very carefully 2020-01-17 20:34:13 +00:00
highlight.go internal/lsp: add highlighting for import statement 2020-01-17 17:07:20 +00:00
hover.go internal/lsp: show comments for grouped variable declarations 2019-12-18 20:39:36 +00:00
identifier.go internal/lsp: refactor find-references and rename 2020-01-16 06:24:15 +00:00
implementation.go internal/lsp: refactor find-references and rename 2020-01-16 06:24:15 +00:00
options.go internal/lsp/source: don't allow mutating DefaultOptions 2020-01-31 15:48:08 +00:00
references.go internal/lsp/source: return obj decl first in find-references 2020-01-16 16:57:51 +00:00
rename_check.go internal/lsp: improve literal func completion candidates 2019-11-07 21:18:00 +00:00
rename.go internal/lsp: permit renaming symbols declared in other packages 2020-01-27 18:56:10 +00:00
signature_help.go internal/lsp: fix active parameter for incomplete parentheses 2020-01-27 19:24:44 +00:00
source_test.go internal/lsp: fix active parameter for incomplete parentheses 2020-01-27 19:24:44 +00:00
symbols.go internal/lsp/source: always look up mapper when building ranges 2020-01-16 01:10:02 +00:00
util.go internal/lsp: don't show list errors unless necessary 2020-01-27 19:59:09 +00:00
view.go internal/lsp: recover from a view initialization failure 2020-01-28 22:02:46 +00:00