https://pantsbuild.org/ logo
#general
Title
# general
l

loud-laptop-17949

01/24/2022, 10:19 PM
What's the simplest way with pants to answer "have any dependencies of this target changed?"? Context: In some of our CI jobs want to run goals based on all depenencies that have changed, but there are a few special cases where we want to invert the logic and say "for this given target, have any of its dependencies changed?".
h

hundreds-father-404

01/24/2022, 11:50 PM
One way to do this is: •
./pants --changed-since={ref} list
to get all changed targets •
./pants dependencies --transitive path/to:tgt
• compare those two Another way to do this is
./pants --changed-since={ref} --changed-dependees=transitive list
and see if the requested target is in the list.
l

loud-laptop-17949

01/24/2022, 11:56 PM
yeah I guess I could do this with one of those + grep
p

polite-garden-50641

01/25/2022, 12:57 AM
this issue keeps coming back, I have seen it with other pants users. so I created a ticket: https://github.com/pantsbuild/pants/issues/14243
2 Views