https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

09/07/2022, 9:04 PM
If I request a
CoarsenedTargets
, how can I get back the original request targets from it?
.members
of each
CoarsenedTarget
?
w

witty-crayon-22786

09/07/2022, 9:58 PM
that will potentially be a superset
if you have target A, and it is involved in a cycle with target B (i.e., they both depend on one another), then they will be the members of a single
CoarsenedTarget
so if you request
CoarsenedTargets
for target A, you’d get back A+B as the “root” members
b

bitter-ability-32190

09/07/2022, 10:34 PM
So I need to pair field_set to the associated CT from the mapping then in my lint change
I'll give that a whirl
w

witty-crayon-22786

09/07/2022, 10:36 PM
um, yea, possibly. the way to think about a
CoarsenedTarget
containing A+B is that they are essentially “indivisible” (which is i think what the docstring says)
when two targets are in a cycle like that, whenever they are built with dependencies, they must be mutually compatible
so their ICs are guaranteed to be compatible, their resolve is guaranteed to be compatible, etc
b

bitter-ability-32190

09/07/2022, 10:44 PM
Yeah I'm trying to map this back to the existing pylint rule code. I think I have it mentally, we'll see how it goes putting pen to paper 🙂