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

sparse-lifeguard-95737

11/03/2022, 12:46 AM
do
__defaults__
apply before or after target generation? i.e. can I get away with only listing defaults for
python_source
and
python_test
, or do I need to use
(python_sources, python_source)
and
(python_tests, python_test)
to be sure I cover everything?
c

curved-television-6568

11/03/2022, 12:57 AM
before target generation.
defaults are applied to the `TargetAdaptor`s as they are created.
you must apply defaults to the generators themselves tho
s

sparse-lifeguard-95737

11/03/2022, 12:59 AM
yeah so in my example, I need both
python_tests
and
python_test
?
c

curved-television-6568

11/03/2022, 12:59 AM
as the defaults aren’t applied to anything not declared in the BUILD file
you need both if you use both in your BUILD file
s

sparse-lifeguard-95737

11/03/2022, 12:59 AM
👍 thanks for clarifying
👍 1
c

curved-television-6568

11/03/2022, 12:59 AM
it is a gotcha
s

sparse-lifeguard-95737

11/03/2022, 1:05 AM
4 Views