ambitious-actor-36781
08/12/2022, 2:23 AMcontract
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.ambitious-actor-36781
08/12/2022, 2:31 AMhundreds-father-404
08/12/2022, 3:19 AMis 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 thingsambitious-actor-36781
08/12/2022, 3:21 AMbitter-ability-32190
08/12/2022, 2:28 PMOr 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