You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to have a smarter™ way of caching a target based on the contents rather than modification time?
For example:
_expensive-target-workhorse:
a bunch of expensive commands
expensive-target : _expensive-target-workhorse!cached
One idea for the implementation (non-PHONY targets) is to store the caches in PROJECT_ROOT/.bmakelib-caches & use checksums to identify if a target exists in the cache and retrieve the value. In the case of directories, the checksum of the tar'ed archive can be used.
The text was updated successfully, but these errors were encountered:
Say you have a target named expensive.bin which does some expensive compiling and linking to produce, well, the executable expensive.bin.
You've also got one simple file which expensive.bin depends upon. For example, simple.foo.
You make expensive.bin and do some tests.
You modify simple.foo and make expensive.bin.
You're not happy w/ the results, so you undo your changes and make expensive.bin which makes simple.foo in the process too.
If there was a build cache, the "remaking in (3) could have been avoided b/c Make could tell that it had already made simple.foo and expensive.bin w/ the exact same contents in (2) and there's no need to remake things. In that case, could simply move the artefacts from the cache to the "build" directory and call it done.
Follow up on a conversation on Mastodon.
Is it possible to have a smarter™ way of caching a target based on the contents rather than modification time?
For example:
One idea for the implementation (non-PHONY targets) is to store the caches in
PROJECT_ROOT/.bmakelib-caches
& use checksums to identify if a target exists in the cache and retrieve the value. In the case of directories, the checksum of thetar
'ed archive can be used.The text was updated successfully, but these errors were encountered: