go/gopls/internal/robustio
Robert Findley 350f1e2c0a gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows
Investigation of renaming flakes revealed that renaming is known to be
flaky on windows, and the go command has a robustio package that works
around known flakes for certain IO operations on darwin and windows.

Rather than duplicate this logic piecemeal, copy the entire robustio
package to the gopls module, along with a script to sync it from GOROOT
using go generate. Use this new package to de-flake renaming, and
replace an existing workaround.

The copy script got a little out of hand at the point where I needed to
add +build constraints. Nevertheless, I've decided to keep it with the
caveat that it may be removed if it proves too difficult to maintain. As
is, it at least serves as documentation for how the sync was done.

For golang/go#56040
For golang/go#56039
For golang/go#56038
For golang/go#55324

Change-Id: Ifeda408ac44a2866e84015a2a38ae340dc0a88bb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/440181
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-10-07 21:46:09 +00:00
..
copyfiles.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
gopls.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
robustio.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
robustio_darwin.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
robustio_flaky.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
robustio_other.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00
robustio_windows.go gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows 2022-10-07 21:46:09 +00:00