I am wondering if there is any reason the changed-...
# general
w
I am wondering if there is any reason the changed-since flag does not work with a specific target?
n
If it did work, what would be the expected behavior? Only fmt/lint/check/something this target if it has changed since X?
w
I would say, only things in target A whose dependencies (including itself) changed since X.
@hundreds-father-404 any idea?
w
@wide-zoo-86070: that isn’t the behavior i would expect if both
--changed-since
and a target were accepted at the same time: rather, i would expect that both the changed targets AND the explicitly specified targets were included.
what you’re asking for is more like https://github.com/pantsbuild/pants/issues/14243. the suggested approach currently though is to use a combination of
list
and
filter
and
dependencies
see https://www.pantsbuild.org/v2.11/docs/advanced-target-selection#piping-to-other-pants-runs
concretely, i think that it would look like
Copy code
./pants --changed-since=$SHA --changed-dependees=transitive filter --address-regex=$RELEVANT_DIRECTORY | xargs ./pants $GOAL_TO_RUN