1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:18:33 -06:00
go/gopls
Rebecca Stambler d7101b74a4 internal/lsp: set version correctly after textDocument/didOpen
The early return logic for didOpen events in
(*snapshot).invalidateContent was preventing the creation of a new
snapshot, which was in turn stopping the versions from being updated.

This exposed a fundamental issue in the way we were calculating
workspace diagnostics. Since we weren't waiting for diagnostics to be
completed for an entire snapshot before replying that the server had
been initialized, snapshots were being cloned without any type
information. For quickfix code actions, we assume that we have all
information cached (since we need to have sent the diagnostics that the
quickfix is mapped to), so we were not finding the cached analysis
results.

To handle this in the short-term, we key analyses by their names, and
then regenerate results as-needed for code actions. This is technically
more correct than simply assuming that we have the analyses cached. In a
follow-up CL, I will send a follow-up that will make sure that
snapshots "wait" on each other to be fully constructed before being
cloned.

Change-Id: Ie89fcdb438b6b8b675f87335561bf47b768641ac
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208265
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-11-25 19:35:51 +00:00
..
doc gopls/doc: expand Emacs docs 2019-11-12 19:56:55 +00:00
internal/hooks internal/lsp: set version correctly after textDocument/didOpen 2019-11-25 19:35:51 +00:00
test gopls: control features for command line tests 2019-11-07 01:09:34 +00:00
go.mod gopls: update go.mod file 2019-10-21 18:45:54 +00:00
go.sum gopls: use go-diff for edit generation 2019-10-10 20:18:25 +00:00
main.go internal/lsp: use options hooks to install diff driver 2019-10-11 16:38:31 +00:00
README.md cmd/gopls: add documentation 2019-08-27 15:23:08 +00:00

gopls documentation

gopls (pronounced: "go please") is the official language server for the Go language.

It is currently in alpha, so it is not stable. You can see more information about the status of gopls and its supported features here.

In general you should not need to know anything about gopls, it should be integrated into your editor for you.

See the installing section of the user guide if you need to install or update gopls by hand.

Issues

If you are having issues with gopls, please first check the known issues before following the troubleshooting guide. If that does not give you the information you need, reach out to us.

You can chat with us on:

If you think you have an issue that needs fixing, or a feature suggestion, then please make sure you follow the steps to file an issue with the right information to allow us to address it.

If you need to talk to us directly (for instance to file an issue with confidential information in it) you can reach out directly to @stamblerre or @ianthehat.

More information

If you want to know more about it, have an unusual use case, or want to contribute, please read the following documents