Comments (13)
Yeah, if I recall correctly, I think that worked – but as I said above, you get bombarded with those error messages. And if you have a lot of dependencies it will spam your logs. I've see a few tens of thousands of lines just filled with those errors since it logs one line per file. So something is wrong with the cache restoration, even though it works in general. Which makes sense, since it probably doesn't expect something modified when restoring the cache. So I would personally classify this more as a bug report or feature request to make go generator work without running into this stream of errors and making the cache restoration work.
from golangci-lint-action.
You can use the repo https://github.com/prisma/prisma-client-go. I'm currently using the raw golangci-lint binary instead of this action and use the github cache action myself.
However, I have created steebchen/prisma-client-go#276 to re-create the error; you should be able to inspect the logs from the action there. You can see that the latest test run logs are spammed with error logs since the log restoration didn't work.
It's maybe not the best repo to create a reproduction since it does quite a lot of things. In theory any repo which changes the code on go generate
should reproduce the error.
from golangci-lint-action.
@sayboras I get the same type of error when I try to use actions/cache
before the linting action, so does this guy #135
I took at stab at fixing this by adding a disable-caching
parameter over in my fork here, but it didn't work. To me it looks like it's the calls that this action makes to setup-go
that causes the /bin/tar
errors, but I couldn't really figure out what it was.
from golangci-lint-action.
@steebchen without going much to details, but I think you can just simply run go generate
as part of github action job before running golangci-lint-action
. If I am not wrong, golangci-lint expects the compilable codebase to execute properly.
from golangci-lint-action.
I've see a few tens of thousands of lines just filled with those errors since it logs one line per file
So I would personally classify this more as a bug report or feature request to make go generator work without running into this stream of errors and making the cache restoration work.
I still feel this is the result of un-compilable codebase, but not the issue with caching or golangci-lint. Maybe related to golangci/golangci-lint#1043 🤔
Personally, I follow alternative approach, which checks in generated file and verifies in github action with go generate
again + git diff --exit-code
. One benefit is that codebase is compilable right after clone. It's just style thingy I think.
from golangci-lint-action.
I still feel this is the result of un-compilable codebase
I'm not sure if I follow. Everything works as intended, the code complies (after go generate is run) and it properly detects errors and fails if there are any, just the cache restoration does not work and results in these errors.
I do need to run go generate on each checkout since I don't commit generated code into VCS, but I think that's a perfectly valid workflow.
from golangci-lint-action.
hi, what I mean is just fresh clone + go build directly. Thinking about this, I feel like I might have pre-mature assumption, sorry about this. Let me try with your repo some time this week to understand the flow properly 🤔
PS: Seem like the original error messages might not have repo name, can you share or confirm if it's public repo ?
from golangci-lint-action.
Would be great to fix the /bin/tar
errors. Even if they don't hurt the functionality it makes finding the actual lint output in the GHA ui hard.
from golangci-lint-action.
I had the same error using Bazel to generate protobufs. By moving this generation work to another job in the same action file and making golangci-lint job dependent on it with the needs
tag, I was able to get around the issue. Hope this helps someone.
from golangci-lint-action.
yeah I guess this is a duplicate of #81 #135, except that the other issue describes the actual problem more clearly
from golangci-lint-action.
This is #81?
from golangci-lint-action.
whoops, thanks. I meant #135
from golangci-lint-action.
duplicated of #135
from golangci-lint-action.
Related Issues (20)
- typecheck error is not resulting in useful annotation HOT 2
- annotations display on 2 PR (develop and staging, although I don't run golangci-lint in staging)
- "File exists" errors when un-taring golangci-lint on upgrading to setup-go@v4 from setup-go@v3 HOT 4
- lint failures do not report which file or line failed HOT 4
- Add support for `new-from-rev` HOT 3
- bug: The file exists in scripts/golangci.yml, but it still gives an error HOT 1
- buildir: failed to load package pebble: could not load export data: no export data for "github.com/ethereum/go-ethereum/ethdb/pebble"
- caches: Do we really need them anymore? The current implementation conflicts with automatic caching in latest `setup-go`. HOT 4
- typecheck fails on first CI run HOT 6
- Incompatibility with go 1.21 HOT 1
- Panic HOT 1
- Can the release of version `node20` be considered? HOT 10
- Make only-new-issues work with Merge Queues, not just Pull Requests HOT 9
- Action output not helpful HOT 6
- Node.js 16 actions are deprecated HOT 2
- tags v3.7.1 / v4 / v4.0.0 but no release HOT 2
- Add release notes for v4.0.0 HOT 1
- bump action runtime to `node20` HOT 1
- Execution time takes too long with deafult GO111MODULE=on HOT 3
- cache upload hangs for 2 minutes after work is done HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golangci-lint-action.