witty-family-13337
04/11/2023, 9:28 AMGenerateSourcesRequest
like:
class GenerateMySourcesRequest(GenerateSourcesRequest):
input = MySourceField
output = MyGeneratedSourceField
Should has_field(MyGeneratedSourceField)
return True
when invoked in the target objects that have MySourceField
as part of their core fields? Not really interesting on addressing the field of the generated sources, just trying to figure out a way of detecting targets that may generate code for a specific source field type.hundreds-father-404
04/11/2023, 3:15 PMSourcesField.can_generate()
is for: https://github.com/pantsbuild/pants/blob/2a13bc880b8827c7f13deedf36beb712f84a6957/src/python/pants/engine/target.py#L2036witty-family-13337
04/11/2023, 3:17 PM