is there a way to ignore dependencies between two ...
# plugins
a
is there a way to ignore dependencies between two targets? Or to terminate dependency traversal at specific target types (in specific controlled cases)? my
contract
target depends on
python_sources
which /eventually/ depends on a second
contract
and I can't package two contracts into one. So either I need to ignore the
contract -> sources
relationship (for anything that isn't off the root target), or just stop at
contract
Currently I've added a
skip_contract_pkg
flag to PythonSources, but its kinda gross and probably gonna bite me in the ass.
99% sure @bitter-ability-32190 is going to say "remember my proposal?"
😂 2
h
is there a way to ignore dependencies between two targets?
Actually Josh did implement this last month 😅 https://github.com/pantsbuild/pants/pull/16155 User API side, you use
!
and
!!
to exclude things
a
ah, not as "done for you" as I'd have hoped
b
Or to terminate dependency traversal at specific target types (in specific controlled cases)?
You might be able to use the "transitive excludes" feature
!!<addr>
, it's enabled for any target whose
dependencies
sets
supports_transitive_excludes
: https://github.com/pantsbuild/pants/blob/5fffd71c8c0ef87ec93621cfaa6820b3ec1e9988/src/python/pants/engine/target.py#L2435