Thanks to visit codestin.com
Credit goes to github.com

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 of 7 tasks
alex-aizman opened this issue Apr 13, 2025 · 7 comments · Fixed by #5727
Labels
bug Something isn't working dependencies Relates to an upstream dependency

Comments

@alex-aizman
Copy link

alex-aizman commented Apr 13, 2025

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

@alex-aizman alex-aizman added the bug Something isn't working label Apr 13, 2025
Copy link

boring-cyborg bot commented Apr 13, 2025

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez
Copy link
Member

ldez commented Apr 13, 2025

Hello, can you provide, as required, a minimal reproducible example and your configuration?

@ldez ldez added the feedback required Requires additional feedback label Apr 13, 2025
@ldez
Copy link
Member

ldez commented Apr 13, 2025

Can you edit your issue to add missing elements, fix the invalid elements, and complete the sections?

Section Status
Welcome 🟠
Description of the problem 🟠
Version of golangci-lint 🟠
Configuration 🔴
Go environment 🔴
Verbose output of running 🔴
A minimal reproducible example or link to a public repository 🔴
Validation 🔴
Supporter 🟢

Legend:

  • 🟢: The section is complete and valid.
  • 🟠: The section is incomplete.
  • 🔴: The section is missing or invalid.

@ldez ldez added the dependencies Relates to an upstream dependency label Apr 13, 2025
@ldez
Copy link
Member

ldez commented Apr 13, 2025

It's a protogetter bug, but without a reproducible example, it will take a lot of time to debug.

So please, @alex-aizman complete the issue description.

@alex-aizman
Copy link
Author

@ldez
Copy link
Member

ldez commented Apr 13, 2025

ghostiam/protogetter#18

@ldez ldez removed the feedback required Requires additional feedback label Apr 13, 2025
@ldez
Copy link
Member

ldez commented Apr 13, 2025

@alex-aizman I saw you are working for @NVIDIA

In this context, I was wondering if you could kindly inquire with your company about the possibility of supporting golangci-lint?

If needed, we can exchange by email: info at golangci dot com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Relates to an upstream dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants