1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:56:16 -07:00
go/internal/lsp/fake
Rob Findley 6a72e3782c internal/lsp/fake: don't lock while calling formatting
While trying to be pragmatic, I simply locked the fake.Editor while
calling textDocument/formatting. This did indeed manifest later on as a
deadlock, so instead we release the lock but fail if the buffer version
changes while awaiting the formatting call.

Change-Id: I0ca24a502f3118e76de306a016449bbe665e70e4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/228230
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-04-14 20:55:25 +00:00
..
client.go internal/lsp/fake: correctly configure the fake editor 2020-04-14 20:27:33 +00:00
doc.go internal/lsp/fake: add fakes for testing editor interaction 2020-02-10 17:44:19 +00:00
edit_test.go internal/lsp/regtest: implement formatting and organizeImports 2020-03-02 19:16:53 +00:00
edit.go internal/lsp/fake: add regexp search and replace 2020-03-24 20:17:55 +00:00
editor_test.go internal/lsp/fake: add regexp search and replace 2020-03-24 20:17:55 +00:00
editor.go internal/lsp/fake: don't lock while calling formatting 2020-04-14 20:55:25 +00:00
workspace_test.go internal/lsp/fake: add fakes for testing editor interaction 2020-02-10 17:44:19 +00:00
workspace.go internal/lsp/fake: correctly configure the fake editor 2020-04-14 20:27:33 +00:00