square / anvil

A Kotlin compiler plugin to make dependency injection with Dagger 2 easier.
Apache License 2.0
1.29k stars 76 forks source link

Don't cache the `projectDir` or `binaryFile` as part of `GeneratedFileCache` #883

Closed RBusarow closed 4 months ago

RBusarow commented 5 months ago

fixes #880

The GeneratedFileCache needs a reference to the current machine's project directory and the path of its binary file. These values were being written to that binary file and restored on subsequent reads. That breaks things when the same cache is used on a different machine due to remote build caching.

Now, those two files are still part of GeneratedFileCache, but only the inner Tables class is actually cached.