cool-easter-32542
03/21/2024, 6:29 PMpants peek to print metadata about that feeds into different processes in our CI. It seems silly to create a custom command to do basically the same thing when peek is already there. You can sort of already do this with custom target types if you use a TargetGenerator, but not with TargetFilesGenerator.
Describe the solution you'd like
Create a new union-type TargetDataAdditionalInfoFieldSet and an abstract TargetDataAdditionalInfo frozen dataclass with a ClassVar[str] attribute label. Add an attribute of type Tuple[TargetDataAdditionalInfo, ...] to TargetData in a field called additional_info. Plugin authors can provide union rules to return custom TargetDataAdditionalInfo class instances for additional info. The output will be formatted as such:
{
...
"additional_info": {
"label1": ...
"label2": ...
}
...
}
pantsbuild/pantscool-easter-32542
04/09/2024, 1:35 PM