This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch juerg/non-strict-cache-key in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 51b6fe1919c4220cfbf386efd2b1148e26092e1f Author: Jürg Billeter <[email protected]> AuthorDate: Wed Mar 17 14:54:57 2021 +0100 element.py: Compute cache key also for rdep without buildable callback The reverse dependency may not be in the build queue yet and thus, the buildable callback may be `None`. However, it's still necessary to update the cache key in non-strict mode. Fixes #1452. Fixes: 8d9bf024 ("element.py: Stop computing cache keys when...") --- src/buildstream/element.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index eb1b02c..b9b06ba 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -2412,10 +2412,12 @@ class Element(Plugin): rdep.__build_deps_uncached -= 1 assert not rdep.__build_deps_uncached < 0 - if rdep.__buildable_callback is not None and rdep._buildable(): + if rdep._buildable(): rdep.__update_cache_key_non_strict() - rdep.__buildable_callback(rdep) - rdep.__buildable_callback = None + + if rdep.__buildable_callback is not None: + rdep.__buildable_callback(rdep) + rdep.__buildable_callback = None # _walk_artifact_files() #
