Alan Donovan

Results 347 comments of Alan Donovan

This stack `3_R2vA` was [reported by telemetry](https://storage.googleapis.com/prod-telemetry-merged/2024-07-21.json): ``` 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.(*typeCheckBatch).importMap.func1:+6 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap:+18 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importPackage:+4 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).getImportPackage:+56 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).typesConfig.func1:+20 golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0 go/types.(*Checker).importPackage:+28 go/types.(*Checker).collectObjects.func1:+13 go/types.(*Checker).walkDecl:+9 go/types.(*Checker).walkDecls:=391 ``` ``` golang.org/x/tools/[email protected] go1.21.3 darwin/arm64...

This stack `iBh0rw` was [reported by telemetry](https://storage.googleapis.com/prod-telemetry-merged/2024-08-04.json): ``` 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.(*typeCheckBatch).importMap.func1:+6 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap:+18 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importPackage:+4 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).getImportPackage:+56 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage.func2:+1 golang.org/x/sync/errgroup.(*Group).Go.func1:+3 runtime.goexit:+0 ``` ``` golang.org/x/tools/[email protected] go1.22.4 linux/amd64 vscode (1)...

This stack `m44AmQ` was [reported by telemetry](https://storage.googleapis.com/prod-telemetry-merged/2024-08-04.json): ``` 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.(*typeCheckBatch).importMap.func1:+6 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap.func1:+11 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importMap:+18 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).importPackage:+4 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).getImportPackage:+56 golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).typesConfig.func1:+20 golang.org/x/tools/gopls/internal/cache.importerFunc.Import:+0 go/types.(*Checker).importPackage:+28 go/types.(*Checker).collectObjects.func1:+13 go/types.(*Checker).walkDecl:+9 go/types.(*Checker).walkDecls:=391 go/types.(*Checker).collectObjects:+42 ``` ``` golang.org/x/tools/[email protected] go1.21.11 linux/amd64...

The possible causes of this failure are: - can't create cache (e.g. disk full?) - can't hash executable (e.g. gopls unlinked, or chmodded?) - I/O error reading index file (e.g....

Very different stack, but same cause. (Probably the same user given the rarity, timing, and OS/ARCH.) ```go func (s *Snapshot) typerefData(ctx context.Context, id PackageID, imports map[ImportPath]*metadata.Package, cgfs []file.Handle) ([]byte, error)...

> Looked at this briefly. We should probably not have a bug that can be reasonably triggered by an OS error, but should also do a better job of surfacing...

A related previous issue was https://github.com/golang/go/issues/57926, in which users exploited the desugaring of cgo to declare methods on types that appear to belong to package C: `func (C.T) method() {}`...

Indeed, I couldn't reproduce it. I notice that (a) there's no go.mod file and (b) the import path reported by `go list` is strange (or perhaps normal for pre-module packages?)....

Closing as a dup of https://github.com/golang/go/issues/68116, since fixed. Please reopen if you observe this again with the latest code.

Hi @dominikh, sorry for the delay. After a long discussion during which both @findleyr and I reversed ourselves, we agree that this is a bug. (Versioning is complex... @timothy-king wrote...