golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.7k stars 17.49k forks source link

x/tools/gopls: "could not locate file for primary type checker error" bug reported by telemetry #66765

Open adonovan opened 4 months ago

adonovan commented 4 months ago

This stack aJzeGA was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics.func1:+40
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics:+119
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage:+127
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage:+70
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.2 go1.22.1 linux/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Closely related to:

Dups: 2oh2Vg 2gV6qw

adonovan commented 3 months ago

This stack 2oh2Vg was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics.func1:+40
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics:+122
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage:+127
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage:+70
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.3 go1.22.0 darwin/arm64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

adonovan commented 1 month ago

This stack 2gV6qw was reported by telemetry:

gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics.func1:+46
golang.org/x/tools/gopls/internal/cache.typeErrorsToDiagnostics:+153
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage:+128
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage:+70
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2:+1
golang.org/x/sync/errgroup.(*Group).Go.func1:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.16.1 go1.22.1 windows/amd64 vscode (1)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.