gtristan commented on code in PR #1997:
URL: https://github.com/apache/buildstream/pull/1997#discussion_r2055264172


##########
src/buildstream/source.py:
##########
@@ -684,6 +821,19 @@ def is_cached(self) -> bool:
         """
         raise ImplError("Source plugin '{}' does not implement 
is_cached()".format(self.get_kind()))
 
+    def collect_source_info(self) -> Iterable[SourceInfo]:
+        """Get the :class:`.SourceInfo` objects describing this source
+
+        This method is guaranteed to only be called whenever
+        :func:`Source.is_resolved() <buildstream.source.Source.is_resolved>`
+        returns `True`.
+
+        Returns: the :class:`.SourceInfo` objects describing this source
+
+        *Since: 2.5*
+        """
+        raise ImplError("Source plugin '{}' does not implement 
collect_source_info()".format(self.get_kind()))

Review Comment:
   I've added this and updated the plugins which use fetchers.
   
   In addition, I've added a public facing `SourceImplError` and updated the 
`collect_source_info()` docstring to specify that callers of the API need to 
handle `SourceImplError` exceptions.
   



-- 
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