Re:Mozilla sccache: ccache with cloud storage
by slavik81 on Sunday December 24, 2023 @04:35PM
(#38757091)
With ccache that would be a cache miss by default. However, that could be made a cache hit by configuring the CCACHE_BASEDIR option. There doesn't seem to be an exact equivalent in sccache. https://github.com/mozilla/sccache/issues/35
Re:Mozilla sccache: ccache with cloud storage
by phlip9 on Sunday December 24, 2023 @01:45PM
(#38755575)
sccache only caches if builds are run from the same absolute path, so indeed different home dirs won't work
Re:Mozilla sccache: ccache with cloud storage
by tentacleuno on Sunday December 24, 2023 @02:04PM
(#38755731)
As a bystander, what would the reasoning be for doing this? I would have assumed that they'd hash each file and use that as a key in a lookup table.
Re:Mozilla sccache: ccache with cloud storage
by sgammon on Sunday December 24, 2023 @02:33PM
(#38756054)
In some languages, symbols are provided which evaluate to a file’s path or directory parent, so program behavior can vary even for the same content hash. That’s just one way paths can bleed in to violate hermeticity/correctness.
Re:Mozilla sccache: ccache with cloud storage
by MereInterest on Sunday December 24, 2023 @02:35PM
(#38756067)
It sounds like somebody assuming a docker build, where everybody’s build will use the same file path. It’s still a very silly restriction, because not everything occurs within docker.
Is sccache susceptible to cache misses when using full paths as cache keys? It would be very helpful if compiling “/home/heads/project/foo.c” could use the cached result of compiling “/home/thunderbong/project/foo.c”.