-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Improve compatibility with compiler caches like ccache or sccache #7693
Comments
One idea I could come up would be to add a new option for Conan:
A solution like this would be non-breaking and easy to adopt. Absolute pathes would not differ between builds, so support for ccache, scchache is given. Having the builds to be run sequentially is not a problem within a CI scenario (and most user-scenarios as well I guess). Is this too shortsighted and I've missed an important bit? |
Hi, @monsdar . It is not the first time we get some issues related to compiler cache systems and Conan, and so far we haven't come up with any solution.... but if any, I think it should follow your approach: an opt-in where the user takes all the responsibility if something fails. There are some issues that will make it very hard for Conan to adopt it as default:
I would love to see implemented the |
Both issues would not apply in our CI usecase:
Due to the opt-in people cannot really expect these to be solved, for someone using this for CI these shouldn't be blockers. Of course users will see that feature and try to use for different purposes and then ask for proper locking and incremental builds :) |
This issue probably can be handled as part of the generating the data for the configuration (like conanbuildinfo.cmake)
This sort of approach would have the advantages that all user-wide data (in .conan) keeps the safe paths and all decisions that potentially impact compile time safety are on a per-project basis. I think windows now has working symlinks now too. |
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.
The text was updated successfully, but these errors were encountered: