-
Notifications
You must be signed in to change notification settings - Fork 192
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
Git Repository is cached to different path each run #350
Comments
The problem is probably that the Depending on how #333 will be implemented and if it will be merged into CPM.cmake, that might be a good solution to your problem. |
ooh thanks :) unfortunately it looks like that only adds an additional subfolder, and doesn't change the hash used for the path
might be able to work around it or hack it in though :b would a PR be welcome to provide an option to override the hash in some way/change the hash to not use the URL? |
I'm not a maintainer of CPM.cmake, but I can imagine that instead of overriding the hash, perhaps it's useful to have an option to exclude the authentication part of the URL from the input for generating the hash. @TheLartians, any thoughts on this? |
I believe you should use something like:
And only keep the url without the token in your source cmakelists file. |
IMO @OlivierLDff's solution is the way to go here, as it's more general purpose and keeps token handling outside of CMake. Note that this works effortlessly for other package managers such as |
Maybe it should be highlighted as a cool trick in readme, I discovered this technique from some of your comments but it is not mentioned a lot on the internet. |
Oh that's a good idea! I'm currently quite busy, so feel free to update the readme in a PR if you want. |
@Zephilinox does using the git config described above solve the issue for you? |
Hey :) we're using CPM 0.35 and we were seeing cache misses in ccache. I believe this is being caused by the path that CPM is downloading dependencies to changing (
CPM_SOURCE_CACHE
is set)For example, one CI job will report the following
where as the next shows
notably
a
andb
are internal self-hosted gitlab repositories.Catch2
's path is stable across jobs.Catch2 is fetched via
where as both internal repos are fetched similarly, with
a
looking like:where the
GIT_TAG
is a commit hash on our default branch, not an actual tagis there something we're missing to enable consistent cached paths across runs?
The text was updated successfully, but these errors were encountered: