Skip to content

v2.1.1 Panic: protogetter: package "tassert" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [4] with length 4 #5726

@alex-aizman

Description

@alex-aizman

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

How did you install golangci-lint?

Other

Description of the problem

$ make lint-update
golangci/golangci-lint info checking GitHub for tag 'latest'
golangci/golangci-lint info found version: 2.1.1 for v2.1.1/linux/amd64
golangci/golangci-lint installed 
$ make lint
Running lint...
ERRO [runner] Panic: protogetter: package "tassert" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [4] with length 4: goroutine 96120 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:26 +0x5e
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*action).analyzeSafe.func1()
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_action.go:50 +0x257
panic({0x157ece0?, 0xc0005f9578?})
        runtime/panic.go:792 +0x132
github.com/ghostiam/protogetter.(*processor).process(0xc05fb79790, {0x1b367d8?, 0xc057157bc0})
        github.com/ghostiam/[email protected]/processor.go:111 +0xbbd
github.com/ghostiam/protogetter.Process(0x4372f6?, 0xc0039b6868?, {0x1b367d8?, 0xc057157bc0?}, 0xa?)
        github.com/ghostiam/[email protected]/processor.go:29 +0x72
github.com/ghostiam/protogetter.analyse(0xc07a16b7a0, 0xc07d85f580, {0x1b367d8, 0xc057157bc0}, 0xc00030b240)
        github.com/ghostiam/[email protected]/protogetter.go:140 +0x9e
github.com/ghostiam/protogetter.Run.func1({0x1b367d8?, 0xc057157bc0?})
        github.com/ghostiam/[email protected]/protogetter.go:122 +0x4c
golang.org/x/tools/go/ast/inspector.(*Inspector).Preorder(0xc05fb79ab8, {0xc05fb79ad0?, 0x2781c60?, 0x163c441?}, 0xc05fb79b50)
        golang.org/x/[email protected]/go/ast/inspector/inspector.go:115 +0x91
github.com/ghostiam/protogetter.Run(0xc07a16b7a0, 0xc00030b240)
        github.com/ghostiam/[email protected]/protogetter.go:121 +0x6ca
github.com/ghostiam/protogetter.NewAnalyzer.func1(0x146d3c0?)
        github.com/ghostiam/[email protected]/protogetter.go:31 +0x17
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*action).analyze.func3(...)
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_checker.go:182
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*action).analyze(0xc005c90380)
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_checker.go:208 +0xb62
github.com/golangci/golangci-lint/v2/pkg/timeutils.(*Stopwatch).TrackStage(0xc004ee7db0, {0x1655892, 0xb}, 0xc0065e4f48)
        github.com/golangci/golangci-lint/v2/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*action).analyzeSafe(0xc0ab559ee0?)
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_action.go:54 +0x71
github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyze.func2(0xc005c90380)
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:86 +0xa5
created by github.com/golangci/golangci-lint/v2/pkg/goanalysis.(*loadingPackage).analyze in goroutine 1611
        github.com/golangci/golangci-lint/v2/pkg/goanalysis/runner_loadingpackage.go:81 +0x1e9
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: protogetter: package "tassert" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [4] with length 4
ERRO Running error: can't run linter goanalysis_metalinter
goanalysis_metalinter: protogetter: package "tassert" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [4] with length 4

Reproducible after golangci-lint cache clean

Version of golangci-lint

v2.1.1

Configuration

Go 1.24

Go environment

Go 1.24

Verbose output of running

included

A minimal reproducible example or link to a public repository

included

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesRelates to an upstream dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions