Hello! First a little bit about my use case. I’m working on a scala project that uses the scala build tool. I’m caching some source dependencies and their compiled forms, all according to documentation provided by sbt. I can see the class files are all restored correctly. However, SBT recompiles all of it anyway!
The root cause of the above is that the modify time (“last changed”) of files is stored in the cache in the default tar format, which truncates that time to whole seconds. SBT doesn’t like this. Would you consider changing the tar format to POSIX? Clearly my use case is quite narrow, but the posix format is the least restrictive format by any measure, see e.g. here: https://www.gnu.org/software/tar/manual/html_chapter/tar_8.html. I’ve successfully tried this by injecting the flag --format=posix
before the cache is stored, and the cache is also successfully loaded again without any additional flags, so the tar version used can already distinguish between posix and gnu tar files without any change. The only thing that would need to change is the storing side of the cache, by adding the flag --format=posix
.