nathanwilliams-ct commented on code in PR #2167:
URL: https://github.com/apache/buildstream/pull/2167#discussion_r3765165353


##########
src/buildstream/_loader/loader.py:
##########
@@ -875,9 +908,10 @@ def provenance_str():
             # we haven't yet for this element),
             # element._get_cache_key() can fail if used with the
             # default _KeyStrength.STRONG.
-            basedir = os.path.join(
-                self.project.directory, ".bst", "staged-junctions", filename, 
element._get_cache_key(_KeyStrength.WEAK)
-            )
+            assert self.project.directory, "The loaders project must have a 
project directory"
+            key = element._get_cache_key(_KeyStrength.WEAK)
+            assert key, "We expect a weak key is always available"

Review Comment:
   With how Element is currently implemented, the WEAK cache key is also 
Optional within element. Unless we change `_get_cache_key` to assert that a 
WEAK key is available at minimum, which I don't want to do in this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to