x/tools/gopls: "failed to cache compiled Go files" error when calling Formatting #36511
Comments
Change https://golang.org/cl/214421 mentions this issue: |
This looks like a |
I agree if the error from |
We had previously required a type-checked package for formatting requests, in order to determine if the package contained any parse errors. We can get this information directly from the ParseGoHandle, so there is no need to check the package. This will prevent `go list` errors from making their way into formatting requests, for which a `go list` really is not needed. Updates golang/go#36511 Change-Id: I297f8880367e800d2343f468535efa80d2937071 Reviewed-on: https://go-review.googlesource.com/c/tools/+/214421 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
Not sure if the |
What version of Go are you using (
go version
)?The replace directive versions are described here:
govim/govim@afa4918
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
govim
has a test that verifies the behaviour of callinggoimports
(viaCodeAction
) and thenFormatting
.The sequence is:
CodeAction
and thenFormatting
We have just seen the
Formatting
call fail in one of our CI builds with the following error:What did you expect to see?
No error
What did you see instead?
As above. The
gopls
log is as follows: gopls.logcc @stamblerre
FYI @leitzler
The text was updated successfully, but these errors were encountered: