4 ms·
We used this for a while at Speechmatics but our LM researchers have a well established workflow based on git working copies on NFS /home and we had a lot of in
by heads 3y ago
We used this for a while at Speechmatics but our LM researchers have a well established workflow based on git working copies on NFS /home and we had a lot of instability between sccache and NFS.
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”.
- phlip9 3y agosccache only caches if builds are run from the same absolute path, so indeed different home dirs won't work
- tentacleuno 3y agoAs 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.
- MereInterest 3y agoIt 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.
- sgammon 3y agoIt’s an unfortunate safety tradeoff to guarantee consistency. Better visibility into program behavior could fix it.
- sgammon 3y agoIn 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.
- slavik81 3y agoWith 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 https://github.com/mozilla/sccache/issues/35