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/internal/regtest/diagnostics: failures in TestEditGoDirectiveWorkspace #52040

Closed
bcmills opened this issue Mar 30, 2022 · 3 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@bcmills
Copy link
Contributor

bcmills commented Mar 30, 2022

TestEditGoDirectiveWorkspace was added 2022-03-17 in CL 393534 (attn @suzmue; CC @findleyr). Unfortunately, it has failed several times since then:

--- FAIL: TestEditGoDirectiveWorkspace (534.58s)
    --- FAIL: TestEditGoDirectiveWorkspace/experimental (534.41s)
        diagnostics_test.go:2247: waiting on:
            	Unmet: empty diagnostics for "main.go"
            
            err:context deadline exceeded
            
            state:
            #### log messages (see RPC logs for full text):
            	Info: "2022/03/18 21:47:13 go env for /tmp/workdir-host-l...
            	Info: "2022/03/18 21:47:14 go/packages.Load\n\tsnapshot=0...
            	Error: "2022/03/18 21:47:14 building workspace mod file: ...
            	Error: "2022/03/18 21:47:14 errors loading workspace: no ...
            	Info: "2022/03/18 21:47:44 background imports cache refre...
            	Info: "2022/03/18 21:47:44 background refresh finished af...
            
            #### diagnostics:
            	main.go (version 0):
            		(2, 7): type parameters require go1.18 or later
            		(2, 9): undeclared name: any (requires version go1.18 or later)
            	go.mod (version 0):
            		(0, 0): no module path for file:///tmp/workdir-host-linux-amd64-wsl/tmp/gopls-regtest-4097331373/TestEditGoDirectiveWorkspace/experimental/work/go.mod
            
            #### outstanding work:
            	Error loading workspace: 0.00
            #### completed work:
            	Load: 1
            	Setting up workspace: 1
            	diagnosing initial workspace load: 1
            	diagnosing files changed on disk: 1
        runner.go:324: closing editor: Shutdown: context deadline exceeded
FAIL
FAIL	golang.org/x/tools/gopls/internal/regtest/diagnostics	577.903s

Given the variety of platforms on which it has failed, I suspect that either the test or the implementation under test is racy.

greplogs --dashboard -md -l -e 'FAIL: TestEditGoDirectiveWorkspace' --since=2022-01-01

2022-03-25T20:23:27-e309672-3dac914/linux-amd64-wsl
2022-03-22T21:30:29-87a8611-ac3efc8/linux-amd64-wsl
2022-03-18T23:20:51-5ea13d0-7ca6902/aix-ppc64
2022-03-18T19:32:40-5ea13d0-a682a5c/plan9-amd64-0intro
2022-03-18T13:39:41-5ea13d0-4aa1efe/linux-amd64-wsl

@bcmills bcmills added the gopls Issues related to the Go language server, gopls. label Mar 30, 2022
@bcmills bcmills added this to the gopls/on-deck milestone Mar 30, 2022
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 30, 2022
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 30, 2022
@findleyr
Copy link
Contributor

Thanks, I believe this is a gopls bug: I have noticed that this behavior is flaky in practice.

@findleyr
Copy link
Contributor

This is a duplicate of #51930

@bcmills
Copy link
Contributor Author

bcmills commented Mar 31, 2022

Ah, I think that issue didn't show up in my issue search because it refers to TestEditGoDirective rather than TestEditGoDirectiveWorkspace. (But if we believe the underlying bug is the same for both, I'm happy with consolidating the issues.)

@findleyr findleyr modified the milestones: gopls/later, gopls/unplanned May 10, 2022
@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2022
@golang golang locked and limited conversation to collaborators Jul 1, 2023
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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. 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