1
0
mirror of https://github.com/golang/go synced 2024-10-01 10:38:33 -06:00
go/internal/lsp
Ian Cottrell 2f43c6d1a2 internal/span: change to private fields
Change span to hide its fields and have validating accessors
This catches the cases where either the offset or the position is being used
when it was not set.
It also normalizes the forms as the API now controls them, and allows us to
simplify some of the logic.
The converters are now allowed to return an error, which lets us cleanly
propagate bad cases.
The lsp was then converted to the new format, and also had some error checking
of its own added on the top.
All this allowed me to find and fix a few issues, most notably a case where the
wrong column mapper was being used during the conversion of definition results.

Change-Id: Iebdf8901e8269b28aaef60caf76574baa25c46d4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/167858
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-03-15 18:05:47 +00:00
..
cache internal/lsp: add correct handling for circular imports 2019-03-15 16:49:21 +00:00
cmd internal/span: change to private fields 2019-03-15 18:05:47 +00:00
diff internal/lsp/diff: fix bug that adds extra line to files on format 2019-02-13 04:28:36 +00:00
protocol internal/span: change to private fields 2019-03-15 18:05:47 +00:00
source internal/span: change to private fields 2019-03-15 18:05:47 +00:00
testdata cmd/lsp: skip completion in string literals 2019-03-15 16:51:35 +00:00
completion.go internal/lsp: configure completion to preselect the first item 2019-03-15 04:42:04 +00:00
diagnostics.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
format.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
imports.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
lsp110_test.go internal/lsp: add more testdata for completion and diagnostics 2018-11-20 06:06:34 +00:00
lsp_test.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
server.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
signature_help.go internal/lsp: implement signature help 2018-11-13 20:09:34 +00:00