go-langserver icon indicating copy to clipboard operation
go-langserver copied to clipboard

Bad intelligence on new rev in GitHub PR file lists

Open efritz opened this issue 5 years ago • 1 comments

We're recently discovered some odd behavior when viewing results from go-langserver via the Sourcegraph browser extension. When on a GitHub PR file list in which a Go file has been added in the new rev, the Go langserver fails to tokenize any Go file in the new revision and no code intelligence appears. This does not seem to affect the original revision.

The failing line is a build context import which always returns a scanner error (expected 'package' but got EOF). Additional debugging shows that the build context attempts to open and return the content of a zero-length file (the file in the new rev). When looking at the temp directories, the zip archives appear to be correct.

See https://github.com/sourcegraph/sourcegraph/issues/9556 for some additional context.

efritz avatar Apr 04 '20 19:04 efritz

Update: this also appears to happen on diff views on Sourcegraph.com, which also points to this being a langserver issue.

efritz avatar Apr 04 '20 19:04 efritz