proud-dentist-22844
12/18/2022, 4:51 AMfmt plugin where a pex process should run once for every instance of my custom schemas target. So far, I've only had this target in one place, but I figured I'd go ahead and make it do The Right Thing â˘ď¸ , and get rid of the assumption that there is only ever one instance of this target.
But, FmtResult expects there to be only one ProcessResult. So, is there a way to
(a) make sure pants runs my fmt rule separately for each target instance; or
(b) combine multiple ProcessResults into one; or
(c) something I haven't considered.
Here is the relevant section of code:
https://github.com/StackStorm/st2/blob/04302f30e1301db50c441beb697812c2d5cc99cc/pants-plugins/schemas/rules.py#L82-L108bitter-ability-32190
12/18/2022, 12:30 PM.create, that's just for convenienceproud-dentist-22844
12/18/2022, 8:58 PMEach time your fmt rule is invoked with a field set for a single targetfmt always does one target at a time?
proud-dentist-22844
12/18/2022, 9:13 PMYou don't have to useOh. Good point. Thanks., that's just for convenience.create
bitter-ability-32190
12/18/2022, 10:54 PMFmt always does one target at a time?
For now, yup! Eventually, also yup
proud-dentist-22844
12/18/2022, 11:34 PMlen(FmtRequest.field_sets) == 1
Then why is it called field_sets?bitter-ability-32190
12/18/2022, 11:37 PMbitter-ability-32190
12/18/2022, 11:38 PMproud-dentist-22844
12/19/2022, 1:30 AMproud-dentist-22844
12/19/2022, 1:30 AMbitter-ability-32190
12/19/2022, 1:34 AM