Is there a way to compile transitive dependencies ...
# general
d
Is there a way to compile transitive dependencies only given a target? For example
Copy code
./pants compile --transitive-only src::
This would compile everything except the targets that match
src::
a
https://github.com/pantsbuild/pants/pull/7350 and the associated issue and followup PR to add query pipelining are precisely to enable this kind of complex target selection very performantly
💯 2
it’s going to make our CI time go down by about 7 minutes per run, have been blocked on review + time but it will happen
w
for now, you can do some subtraction
on a high level,
Copy code
./pants compile (./pants dependencies src:: - ./pants list src::)
w
@damp-easter-17791: assuming this is for an IDE usecase, adding an "transitive only" flag to
export-classpath
would be useful
because compiling something (itself) is a tree falling in the forest. the stuff under
.pants.d
is 100% not a public API, and will be moving/changing/going away
particularly via remoting.
OR querying and then running
export-classpath
, would work
d
@witty-crayon-22786 yes, this is for an IDE usecase. I'm poking into
.pants.d
internals right now, I wasn't aware of
export-classpath
. That sounds like a much better solution than what I'm currently doing 😅