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

wonderful-iron-54019

06/18/2020, 1:24 PM
Hey folks, am i correct in understanding that you cannot combine a spec-file with a
--changed-include-dependees
flag?
h

hundreds-father-404

06/18/2020, 4:27 PM
You can use that flag, but it won’t do anything. The flag only has an impact on the behavior of —changed-since
If you want to see what targets have changed, you can run ./pants dependencies —transitive project.py
w

wonderful-iron-54019

06/18/2020, 4:28 PM
yeah i figured out what i was going. for. essentially wanted all changed targets - build file changes + dependees
👍 1
h

hundreds-father-404

06/18/2020, 4:29 PM
w

wonderful-iron-54019

06/18/2020, 4:29 PM
so basically
git diff | grep -v BUILD | xargs ./pants list | xargs ./pants dependees
a little involved but. it works
h

hundreds-father-404

06/18/2020, 4:29 PM
—changed-since + that flag will get what you’re describing without this dance
w

wonderful-iron-54019

06/18/2020, 4:30 PM
right bu it will also grab targets that. only have cosmetic changes appliedto. the. BUILD file
h

hundreds-father-404

06/18/2020, 4:30 PM
I see. Yes, that is true.
w

wonderful-iron-54019

06/18/2020, 4:31 PM
imo it would make sense to have a
--include-dependees=[direct|transitive]
that applies to all styles of target selelction
my ideal case was to build a spec-file and. run:
Copy code
./pants --spec-file=/tmp/changes --changed-include-dependees=direct deploy
h

hundreds-father-404

06/18/2020, 4:32 PM
That’s a good feature request. Would you be willing to open a github issue with that idea?
w

wonderful-iron-54019

06/18/2020, 4:32 PM
of course!
h

hundreds-father-404

06/18/2020, 4:32 PM
Thanks :) a
w

wonderful-iron-54019

06/18/2020, 5:24 PM
https://github.com/pantsbuild/pants/issues/10087 I think this sums it up, happy to edit or elaborate.
h

hundreds-father-404

06/18/2020, 5:38 PM
Looks good, thanks!
❤️ 1
3 Views