houseabsolute / precious

One code quality tool to rule them all
Apache License 2.0
82 stars 4 forks source link

Caching #2

Open autarch opened 4 years ago

autarch commented 4 years ago

Caching tidy/lint checks between runs would be great.

Some things to think about ...

Caching should be per filter and then per file/dir.

The cache key should include file (or dir) checksum, precious binary checksum, filter config, and checksum of the filter's binary.

spazm commented 4 years ago

Some linters and tidiers implement their own caching, could that be leveraged? Would it be worth the hassle of keeping track of which ones did vs didn't? Does cargo fmt do any caching detection I wonder?

You've got me thinking about the adage that all projects end up as either an email client or a poor re-implementation of Make.

At a minimum threshold, this will need to work better than make -j ... would work, assuming that the linter and tidier dropped some sort of stub output for the make rules. (Implementing checksums would automatically pass that bar.)

autarch commented 4 years ago

It'd certainly be easy enough to support a use_cache = false option for filters that implement their own caching.