go/internal/lsp/cache
Heschi Kreinick e7dfe0279f internal/lsp: remove redundant fields/code after source.Error deletion
Collapse Diagnostic.Kind, Source, and Category into just Source. Remove
code that converted from Diagnostic to Diagnostic. Notes on the changes
I had to make along the way:

- We used to use Kind to determine Severity. Set Severity when the
Diagnostic is created instead.
- Use constants for Source as much as possible -- we still need to use
Analyzer.Name for analysis diagnostics. It would be nice to break that
dependency so that Source was totally opaque, but that's a separate
issue.
- Introduce a new Source for gc_details, "optimizer details". It was "go
compiler" previously.
- Some of the assignments are a little arbitrary. Is inconsistent
vendoring really a "go list" error?
- GetTypeCheckDiagnostics had code to cope with diagnostics that had no
URI associated with them. We now spread such diagnostics to all files
when they are generated.
- Analyze modifies Diagnostics by adding a Tag to them. That means it
has to own them, so I had it clone them. I would like to push that logic
down to the diagnostics, per the TODO, but that's another CL.

And some observations:
- It's obviously tempting to combine DiagnosticSource and
diagnosticSource, but they mean very different things. I'm open to a
better name for one or the other.

Change-Id: If2e861d6fe16bfd2e5ba216cf7e29cf338d0fd25
Reviewed-on: https://go-review.googlesource.com/c/tools/+/288215
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-02-02 23:37:55 +00:00
..
analysis.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
cache.go internal/lsp/cache: compare file size when invalidating file cache 2021-01-12 21:35:00 +00:00
check.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
error_test.go
errors.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
imports.go internal/lsp/cache: fix panic in GOPATH mode 2021-01-07 18:21:03 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
mod.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
mod_tidy.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +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.go internal/memoize: add a final argument to Bind for cleaning up 2020-10-30 19:59:21 +00:00
parse_test.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
pkg.go internal/lsp: remove the source.Error type 2021-02-02 20:40:51 +00:00
session.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
snapshot.go internal/lsp: remove the source.Error type 2021-02-02 20:40:51 +00:00
view.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
view_test.go internal/lsp: restructure the way we report critical errors 2020-12-29 01:39:31 +00:00
workspace.go internal/lsp/cache: only reload the workspace on saved changes 2020-12-23 22:53:30 +00:00
workspace_test.go internal/lsp/cache: compare file size when invalidating file cache 2021-01-12 21:35:00 +00:00