diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2020-09-21 08:26:47 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-09-21 08:26:47 +0000 |
commit | ee43d10c7e16ec0598a2a43402b52a8817c76079 (patch) | |
tree | 509f8792b31781bf690cfecba643a5145066c149 | |
parent | a7e2c92885711336a6774792a9d160ea3fe335bf (diff) | |
parent | d96919594278add2b52925bc52c6377bafafc6c5 (diff) | |
download | buildstream-ee43d10c7e16ec0598a2a43402b52a8817c76079.tar.gz |
Merge branch 'tristan/fix-cache-key-comments' into 'master'
element.py: Clarify weak and strict key descriptions in __update_cache_keys()
See merge request BuildStream/buildstream!2069
-rw-r--r-- | src/buildstream/element.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index fd6e2da5c..06327baf1 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -3150,20 +3150,22 @@ class Element(Plugin): # Note that it does not update *all* cache keys - In non-strict mode, the # strong cache key is updated in __update_cache_key_non_strict() # - # If the element's is not resolved, this is - # a no-op (since inconsistent elements cannot have cache keys). + # If the element is not resolved, this is a no-op (since inconsistent + # elements cannot have cache keys). # # The weak and strict cache keys will be calculated if not already # set. # - # The weak cache key is a cache key that doesn't change when its - # runtime dependencies change, useful for avoiding full rebuilds - # when one's dependencies guarantee stability across - # versions. Changes in build dependencies still force a rebuild, - # since those will change the built artifact directly. + # The weak cache key is a cache key that doesn't change when the + # content of the build dependency graph changes (e.g., the configurations + # or source versions of each dependency in Scope.BUILD), but does + # take the shape of the build dependency graph into account, such + # that adding or removing a dependency will still cause a rebuild to + # occur (except for the strict dependency and BST_STRICT_REBUILD element + # cases which are treated specially below). # - # The strict cache key is a cache key that changes if any - # dependency has changed. + # The strict cache key is a cache key that changes if any dependencies + # in Scope.BUILD has changed in any way. # def __update_cache_keys(self): if self.__strict_cache_key is not None: |