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

hundreds-father-404

08/20/2020, 4:38 PM
Agreed we’d need to answer that question. Expecting it to be on a “root” target—i.e. a target with no dependees—is tricky to implement, though. There is nothing enforcing that no one depends on a
python_tests
or
python_binary
target, outside of convention. The best thing I could think of to try our best to enforce that
!!
is only used on roots is to have plugin authors express if it’s supported in the Target API. When defining a Dependencies field for their target type, they could set a class property `supports_transitive_excludes = True`:
Copy code
class PythonBinaryDependencies(Dependencies):
     supports_transitive_excludes = True
If this is set to the default of
False
, then we’ll error if any values in the
dependencies
field start with
!!
.