-
Notifications
You must be signed in to change notification settings - Fork 27
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
Build cache #90
base: master
Are you sure you want to change the base?
Build cache #90
Conversation
DeepCode's analysis on #cd6ce6 found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
builder.build(target='install', variant=pb.variant) | ||
if util.USE_SYMLINKS: util.symlink_dir(install_dir, self.prefix) | ||
else: util.copy_dir(install_dir, self.prefix) | ||
package_hash = self.hash_pkg(pb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to include the toolchain settings in the hash. We could hash the cget/cget.cmake
file but we also need to hash any files included in cget.cmake
(like when the user is using cget init -t my-toolchain.cmake
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, for me thats not so relevant right now, but yeah, for completeness sure. i was leaving some slack to get it working at all, and in doubt just clear the cache. btw, we will also here run into the problem that sub-dependencies inherit their parents cmake defines, which is unclean
Also, there are CI error. Are you able to look into those? |
turns out it is not as simple. the way I make it work in my fork is by isolating packages against each other. i.e. i remove all references to the build local cget dir in the toolchain file and instead pass a list of CMAKE_PREFIX_PATH to the build. in the next step to make this more robust I should also fix the define inheritance, i.e. that dependents inherit the defines of the packages they where built from. you want me to pull those bits in here? |
That should probably only happen when the build-cache is enabled(otherwise it should fallback on the old behavior).
There should be a different flag for defines that dont inherit as this is a breaking change. Furthermore, the hash should use the inherited defines to compute the hash. |
Not actually sure. What is the advantage of the merged prefix? Using specific prefixes should always work afaics.
So the inheriting was intended? It seemed to me that it was incidental because it effectively means the order of requirements will change the result. Also usually defines made in one packet are not meant for others? |
--recipe-deps-only
option to ignore dependencies inside source, which greatly speeds up cached installations