go/internal/lsp/cache
Heschi Kreinick 82bb89366a internal/lsp/cache: validate workspace path case
On case-insensitive file systems, the editor may send us a path that
works but doesn't match the actual file's case. Then when we run go
list, we'll get mismatching paths and everything will break.

We can't reliably fix this problem: tracking what case the editor
expects is too difficult to be worth it. Instead, check the workspace
path and bail if it's mismatched.

Possibly we should also check files on DidOpen or such, but we can start
with this.

Updates golang/go#36904.

Change-Id: I7635c8136bf9400db4143a0f2fde25c39b5abc44
Reviewed-on: https://go-review.googlesource.com/c/tools/+/225239
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2020-03-27 19:55:53 +00:00
..
analysis.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
cache.go internal/lsp: move the debug.Instance onto the Context 2020-03-03 22:54:53 +00:00
check.go internal/lsp: add support for type error analyzers 2020-03-27 17:27:16 +00:00
debug.go internal/lsp/lsprpc: add a handshake between forwarder and remote 2020-02-24 22:51:04 +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/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
external.go internal/lsp: move the telemetry package 2020-03-18 13:22:49 +00:00
load.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
mod.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
os_darwin.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
pkg.go internal/lsp: add support for type error analyzers 2020-03-27 17:27:16 +00:00
session.go internal/lsp: migrate telemetry to using the event package 2020-03-12 03:59:16 +00:00
snapshot.go internal/lsp: remove command-line-arguments as a workspace package 2020-03-25 20:31:30 +00:00
view.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00