hauntsaninja / mypy_primer

Run mypy and pyright over millions of lines of code
MIT License
55 stars 29 forks source link

Use cached "base" errors #82

Open ikonst opened 1 year ago

ikonst commented 1 year ago

I haven't looked too close at the implementation, but given that mypy_primer gets to run on the base commits, could we somehow leverage GitHub action cache to get the "base" errors?

Maybe we could have mypy_primer expect to find "base" errors in a specific directory that could be "primed" by actions/cache? In that case, I assume it should pick up a cached project date, as you want to compare apples to apples.

ikonst commented 1 year ago

@hauntsaninja any immediate thoughts?

hauntsaninja commented 1 year ago

Something like that sounds interesting. You're right that making sure we check out the same versions of all the projects is the important detail to get right. Will also have to think a little about versioning of mypy_primer itself, since currently we just always use latest. I guess it will make primer errors on old PRs a little harder to debug, but that seems fine since we can just merge master in. Given complexity, might only be worth it once mypy_primer is the slowest step in mypy CI.