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

damp-easter-17791

11/02/2019, 6:00 PM
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

aloof-angle-91616

11/02/2019, 6:13 PM
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

wide-energy-11069

11/03/2019, 5:08 AM
for now, you can do some subtraction
on a high level,
Copy code
./pants compile (./pants dependencies src:: - ./pants list src::)
w

witty-crayon-22786

11/03/2019, 10:28 PM
@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

damp-easter-17791

11/03/2019, 11:02 PM
@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 😅
2 Views