Maybe not the best place to put it, but any intuit...
# general
r
Maybe not the best place to put it, but any intuition on why the v1
context.target_roots
is a list and not a set?
e
Off the top of my head, target_roots (at one point?) represented the targets listed by a user on the CLI. They could certainly list a target more than once. I'm not sure that's the reason though.
r
Hmm, I can’t see why ordering and repeats would matter to any task, but if any task did need ordering, I guess it would make sense to keep them as a list
thanks!
a
i don’t know of any task that makes use of the ordering of targets on the command line (except maybe ./pants paths??)
tasks will and should typically use topological_order=True in self.invalidated() if they want ordering
r
I agree 🙂 But that’s a different kind of ordering, not what the user specified. I can’t see a reason to not turn it into a set, just wanted to ask if someone knew off the top of their heads
e
Agreed on
./pants paths
example being pertinent here. I can't think of an example that breaks with deduping though. That said, it seems to make sense to keep some faithful representation of the initial request somewhere for access by rules.