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: sudden errors in unrelated files #38730

Closed
atombender opened this issue Apr 28, 2020 · 5 comments
Closed

x/tools/gopls: sudden errors in unrelated files #38730

atombender opened this issue Apr 28, 2020 · 5 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@atombender
Copy link

What did you do?

Edited code in a single test file in VSCode.

What did you expect to see?

Only my current file should be affected by changes in a test package.

What did you see instead?

Suddenly, a large number of unrelated files were marked as having errors. I did not have any of these files open, nor did I change them, nor did (as far as I know) any program on my computer touch them. All the errors in them are spurious; restarting gopls causes them to go away.

Screen Shot 2020-04-28 at 15 15 10

Log: gopls.log.gz. This is from gopls started, so fairly large. Jump to line 14890 to see what looks like the first error.

Note: While I have GOFLAGS=-tags=... set, none of the affected files use build tags.

Build info

golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
    golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
    golang.org/x/tools@v0.0.0-20191130070609-6e064ea0cf2d => ../
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info

go version go1.13.10 darwin/amd64

@gopherbot gopherbot added this to the Unreleased milestone Apr 28, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 28, 2020
@gopherbot
Copy link

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

stamblerre commented Apr 28, 2020

Thanks for the report. This looks like #38403, which is unfortunate because I had hoped that it was only caused by -remote.

Did any of the files with errors depend transitively on the readthrough package?

@stamblerre stamblerre changed the title x/tools/gopls: Sudden errors in unrelated files x/tools/gopls: sudden errors in unrelated files Apr 28, 2020
@atombender
Copy link
Author

Yes, but not all. Also, my last edit to anything in the readthrough package was two minutes before this happened. I mostly edited the readthrough_test package.

You guys really don't like capitalized sentences in issue titles. 🙂

@stamblerre
Copy link
Contributor

Yes, but not all. Also, my last edit to anything in the readthrough package was two minutes before this happened. I mostly edited the readthrough_test package.

Thanks for clarifying. Tests can still be dependencies (if this is an in-package test, and not an x_test) because other test packages depend on test variants. It's possible that we have another cache invalidation issue with test variants, but I'm not sure how that could've happened since it's been a while since the type-checking code has changed.

I think I will close this issue as a duplicate of #38403 so that we can track everything in one place. Please comment there if you're able to find a consistent repro for this.

You guys really don't like capitalized sentences in issue titles. 🙂

We tend to follow the same style in issues and commit messages - see https://github.com/golang/go/wiki/CommitMessage.

@stamblerre
Copy link
Contributor

Duplicate of #38403

@stamblerre stamblerre marked this as a duplicate of #38403 Apr 28, 2020
@golang golang locked and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants