Summary
TestManagerCheckRealGopls is described as a temporary manual-verification test, but it runs as part of the default go test ./... suite whenever a gopls executable exists. An installed but unusable gopls causes the entire suite to fail instead of skipping or remaining opt-in.
Reproduction
go test ./internal/lsp -run '^TestManagerCheckRealGopls$' -count=1 -v
Observed:
Manager.Check returned error: lsp error -1: EOF
On this host, gopls version also reports that it cannot create its persistent-index cache because a cache path component already exists in an incompatible form. The binary is present on PATH, so the test does not skip, but the server exits during initialization and Zero observes EOF.
Environment: Go 1.26.5, Windows amd64. Observed at upstream commit 6fc1220.
Relevant code
internal/lsp/real_gopls_manual_test.go skips only when exec.LookPath("gopls") reports that the binary is absent. Its comment calls it a temporary manual-verification test, yet it has no build tag or explicit opt-in.
Expected behavior
The default hermetic test suite should not fail based on the health, version, or local cache state of a developer's globally installed language server.
Actual behavior
Any executable named gopls enables the integration test; initialization failures such as EOF fail go test ./....
Suggested fix
Move the real-server test behind an integration build tag or explicit environment-variable opt-in. Keep default coverage on the existing fake LSP server. If the real-server test remains automatic, probe gopls health/version and skip with a clear reason when initialization is unavailable.
Summary
TestManagerCheckRealGoplsis described as a temporary manual-verification test, but it runs as part of the defaultgo test ./...suite whenever agoplsexecutable exists. An installed but unusablegoplscauses the entire suite to fail instead of skipping or remaining opt-in.Reproduction
Observed:
On this host,
gopls versionalso reports that it cannot create its persistent-index cache because a cache path component already exists in an incompatible form. The binary is present onPATH, so the test does not skip, but the server exits during initialization and Zero observes EOF.Environment: Go 1.26.5, Windows amd64. Observed at upstream commit
6fc1220.Relevant code
internal/lsp/real_gopls_manual_test.goskips only whenexec.LookPath("gopls")reports that the binary is absent. Its comment calls it a temporary manual-verification test, yet it has no build tag or explicit opt-in.Expected behavior
The default hermetic test suite should not fail based on the health, version, or local cache state of a developer's globally installed language server.
Actual behavior
Any executable named
goplsenables the integration test; initialization failures such as EOF failgo test ./....Suggested fix
Move the real-server test behind an integration build tag or explicit environment-variable opt-in. Keep default coverage on the existing fake LSP server. If the real-server test remains automatic, probe
goplshealth/version and skip with a clear reason when initialization is unavailable.