discussion: vendoring of golangci-lint deps for easier usage as tool dependency #6411
Unanswered
brandon1024
asked this question in
Q&A
Replies: 2 comments 1 reply
|
Apologies -- I accidentally opened this as a bug. A feature request might have been more suitable. |
0 replies
|
Hello, The problems explained inside the documentation related to the installation from source are not fixed by vendoring dependencies. The two main problems are:
Previous versions of golangci-lint should not be built with never version of Go. The vendoring doesn't change anything about the modification of the dependencies, especially when using And to be a bit more exhaustive, I have discussed directly with the Go team and they don't have solutions too. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Welcome
typechecksection of the FAQ.How did you install golangci-lint?
go tool
Description of the problem
Hello 👋
First and foremost, thanks a bunch for your efforts in golanci-lint. I've integrated golangci-lint in a handful of projects I maintain at Siemens and it has been a huge help in maintaining consistent style and code quality.
One of the biggest pain points we've had with golangci-lint is the distribution and integration in our build systems. Installations are closely tied to the Go toolchain version used to build the project, so whenever we upgrade Go for a project, users will also need to upgrade golangci-lint as well. When you maintain a lot of projects using different versions of Go, this becomes a headache, and this headache is passed down to all project developers.
╰╼ ▶ golangci-lint run Error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.0)Despite being discouraged, we've completely switched to using golangci-lint as a
tooldependency in dedicated go modules to make our life easier. This solution has its quirks, but we can live with this.It's well known that golangci-lint has a pretty large dependency tree, and I understand that this is one of the main reasons that maintaining golangci-lint as a tool dependency is discouraged. I've been asking myself why golanci-lint hasn't explored vendoring of linter dependencies instead? Vendoring comes with it's own set of challenges, but it would make golangci-lint completely self sufficient, and this means that downstream users could easily pull in golangci-lint (
go install,go run golangci-lint,go tool golangci-lint run, etc) without the difficulties that come from the large dependency graph.I'm curious if golangci-lint maintainters have considered this approach, and if so why was it decided not to vendor dependencies?
Thanks again :-)
Version of golangci-lint
Details
N/A
Configuration
Details
N/A
Go environment
Details
N/A
Verbose output of running
Details
N/A
A minimal reproducible example or link to a public repository
Details
N/A
Validation
Supporter
All reactions