-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
We recently set up sccache with a local S3 storage for our CI infrastructure. With this runners should be able to reuse cached compilations instead of recompiling from source all the time. The problem now is that due to how Conan stores packages internally the cache is not used in most cases:
sccache (and ccache or other such solutions) use the absolute path of the source-files to determine whether a source-file has changed. With Conan the absolute path to the sources is relying on attributes of the package: $CONAN_HOME/data/<name>/<version>/<user>/<channel>. Dependencies also have their path changed frequently: $CONAN_HOME/data/bar/.5.6/otheruser/otherchannel/package/<someSHA>/. See this comment for reference.
Especially in our case this is a hard problem, as we extend SemVer with metadata regarding the Git SHA and Build ID, so versions are changing quite a bit: Foo/1.0.0+abcdefg.GL00137@user/channel. Pathes are never the same between builds.
From mozilla/sccache#35 it does not seem that sccache is interested in solving this, it's quite a complex problem for them as well.
I'd like to ask if anyone on the Conan-side has experience with this type of scenario. Perhaps there's already a solution that'd help, perhaps we can come up with an idea to enable a better usage of compile caches with Conan.
- I've read the CONTRIBUTING guide.