New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/cmd/gopls: call to Formatting incorrectly reports there are parse errors #31759
Comments
|
Actually that last comment is a red herring. Edited. |
…t.txt Pending resolution of golang/go#31759
Pending resolution of golang/go#31759
Pending resolution of golang/go#31759
Pending resolution of golang/go#31759
I'm also seeing random test flakes in |
All tests of format-on-save via gofmt and GOVIMGoFmt (remain) skipped pending golang/go#31759 The tests of range-based GOVIMGoImports and GOVIMGoFmt are skipped pending golang/go#31150
All tests of format-on-save via gofmt and GOVIMGoFmt (remain) skipped pending golang/go#31759 The tests of range-based GOVIMGoImports and GOVIMGoFmt are skipped pending golang/go#31150
This is now effectively superseded by #31150; a fix subsequent to the reporting of this issue has now changed the reported error to:
|
What version of Go are you using (
go version
)?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?
The following sequence of events captures the calls to
gopls
:Call sequence
As you can see, prior to the call to
Formatting
, the file contents sent togopls
via a call toDidChange
(with version 3), the contents were the string:which does not contain parse errors:
It does not type check, but there are no parse errors.
What did you expect to see?
The call to
Formatting
to succeed and return the edits necessary to reformat the file.What did you see instead?
The error:
cc @stamblerre @ianthehat
The text was updated successfully, but these errors were encountered: