Hey people! As a result of <this> feature merge, ...
# general
r
Hey people! As a result of this feature merge, I was expecting that
--changed-since
and
--changed-dependents
would filter out and apply goals only on specific targets changed, based on changed transitive dependencies in specific lines of
default.lock
Is the above PR only adding a support for a core feature, which will eventually become part of plugins that can leverage it to provide a fine-grained targetting of changed targets?
h
Ah no, currently Pants does not understand transitive third party dependencies at all for this kind of purpose.
--changed-*
applies to first party dependencies.
r
is there any plan to add support for this?
h
Possibly in the new python backend
What is the use case?
r
Lets say's I have a mono-repo, with 50 projects (BUILD + SOURCE_ROOT). Let's say 20 of those depend on
pandas
. Now if a version is bumped only in
pandas
lib in
default.lock
, the command
pants --changed-since=main --changed-dependents=transitive publish
will publish all 50 projects in the mono-repo. The expectation is that pants realizes that since only
pandas
is changed in
default.lock
, only the affected 20 projects are changed and target for publish from above command.
I saw from github discussion above, the comment from kaos is referring to this issue (also links to the PR which I have posted in first message)
Similar request https://github.com/pantsbuild/pants/discussions/20897#discussioncomment-9372488, few comments mention that this PR should resolve this, but as you mentioned, that it's not resolved by this
h
But in this scenario pandas is a direct dependency, no? It’s in your input requirements, not just in the lockfile as a transitive dep?
r
its a direct dependency of only a few projects
c
If implemented, this would not exactly make it a noop from understanding the dep graph, but I think would significantly improve the cache situation: https://github.com/pantsbuild/pants/pull/20994