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

renthraysk opened this issue Feb 5, 2020 · 3 comments


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?


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
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
Copy link

@gopherbot gopherbot commented Feb 6, 2020

Change 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
Run-TryBot: Robert Findley <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Rebecca Stambler <>
Copy link

@gopherbot gopherbot commented Feb 19, 2020

Change 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
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.