Skip to content
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/gopls: gopls generates errors for code in files that have been deleted #37049

Closed
renthraysk opened this issue Feb 5, 2020 · 3 comments
Closed
Labels
Milestone

Comments

@renthraysk
Copy link

@renthraysk renthraysk commented Feb 5, 2020

What version of Go are you using (go version)?

$ go version

go version go1.13.7 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Open a deleted file in VSCode's Source Control tab.
Depending on how much refactoring of the code as under gone, this can generate errors, but completely unhelpful as the code is defunct.

What did you expect to see?

No errors generated from deleted files.

What did you see instead?

Errors generated

@gopherbot gopherbot added this to the Unreleased milestone Feb 5, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 5, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.4.0 Feb 5, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 6, 2020

Change https://golang.org/cl/218278 mentions this issue: internal/lsp/lsprpc: add test for empty diagnostics in deleted files

gopherbot pushed a commit to golang/tools that referenced this issue Feb 10, 2020
Add a test for the bug reported in golang/go#37049: we are missing empty
diagnostics for deleted files. Doing this involved added a missing
RemoveFile method on the fake.Watcher type.

Skip the test for now, as it is failing.

Updates golang/go#37049
Updates golang/go#36879

Change-Id: Ib3b6907455cc44a2e6af00c2254aa444e9480749
Reviewed-on: https://go-review.googlesource.com/c/tools/+/218278
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 19, 2020

Change https://golang.org/cl/220079 mentions this issue: internal/lsp: clear diagnostics for deleted files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.