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
Discussion: get rid of setup-go dep, due to outdated code and inability to update any dependencies #365
Comments
Hello, The problem is that Go is required to run golangci-lint. Then we have to provide something to inform the users. |
sure, we can check if go is not installed, then just fail the step with an error message |
I'm explicitly installing Golang in lint workflows anyway, so this works for me. To avoid excessive boilerplate, I've authored a composite action (simple yaml based action) - which can now include other actions in their steps as of a few weeks ago (previously only shell steps were possible as steps). Using a composite action I can execute both setup-go and then golangci-lint actions together and reference this as a one liner from other workflows. Maybe we can offer up a simple composite action under this organisation, offering users this alternative use path - and keeping setup-go out of any deps? Seems like the best of both worlds? |
I'm doing it as well
I think this is a good idea |
Just to circle back @SVilgelm - this is how I'm handing it in a small composite action. Something I think could be offered up in the https://github.com/golangci org. https://github.com/flipgroup/action-golang-with-lint Of course a more complete version could pass over all allowed lint action arguments. Note I'm having to set |
Not sure if my problem is related to this issue, but I got this error:
Presumably this is because Ergonomically, it would be great if Here is the yml: jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
args: --disable errcheck --timeout 5m
only-new-issues: true |
|
When you say preinstalled version, is that from |
The go installation available to golangci-lint when running via github actions is Go v1.15 or maybe even lower, causing problems using newer API calls. That is, golangci-lint's Go version should be higher than v1.15. See this issue for details: golangci/golangci-lint-action#365
I would like to proceed with getting rid of the setup-go dep as it has been blocking any other improvements for a while now. |
sure, go ahead |
the code is merged, so I will work on updating some other dependencies and the will bump v3 of the action |
@SVilgelm can you add this note to the compatibility section of the README.md:
|
ok, closing this issue, because v3 is released :) |
Hello, I would like to ask everyone in @golangci/team and @golangci/core-team about you opinion in removing the setup-go as direct dependency.
Now we are stuck in upgrading any dependencies, fixing any vulns, due to inability to build the setup-go package.
So if we remove it then we will need to explicitly install go, like
of course it will require to bump v3.
The text was updated successfully, but these errors were encountered: