fix: add local imported packages to the packages to analyze when using cache#4424
fix: add local imported packages to the packages to analyze when using cache#4424ldez wants to merge 2 commits intogolangci:masterfrom
Conversation
849f21e to
ccf27b4
Compare
bombsimon
left a comment
There was a problem hiding this comment.
Did you do any tests (manual or otherwise) on a somewhat larger codebase and/or with a lot of local imports? Are we talking millisecond increases or can this become a cardinality bomb and grow much bigger than that?
The fix looks good and is understandable so I'll approve this since I have full trust in your judgement here 😄
I didn't do a benchmark because this depends on how many direct packages a package depends on, so it's difficult to create accurate benchmarks.
As it just adds the direct packages related to one analyzed package and not the indirect packages, the cardinality is limited. But if a package depends on thousands of local packages (I hope nobody does that), the impact will be important on performances (only for the run after the first one) but I don't have a better solution. EDIT: I have some doubts maybe the real problem is the linter 🤔 |
To reproduce the problem:
If it works you should see:
but if it not works:
This will impact negatively the performance of a run with a cache but it will increase the stability of reports.
Fixes #4423