bitter-ability-32190
11/12/2021, 12:26 PMpants.backend.python.target_types_rules
into a helper method, but then Pants gets upset
Exception: pants.backend.python.target_types_rules:134:generate_targets_from_python_tests() returned a result value that did not satisfy its constraints: <coroutine object _generate_targets_helper at 0x7f84820224c0>
bitter-ability-32190
11/12/2021, 12:27 PMcurved-television-6568
11/12/2021, 12:29 PMasync def
rule?curved-television-6568
11/12/2021, 12:30 PMGet
and MultiGet
invocations.bitter-ability-32190
11/12/2021, 12:31 PMawait
my helper 😮bitter-ability-32190
11/12/2021, 12:31 PMcurved-television-6568
11/12/2021, 12:31 PMbitter-ability-32190
11/12/2021, 12:32 PMasync
functions could await
things?curved-television-6568
11/12/2021, 12:32 PMbitter-ability-32190
11/12/2021, 12:33 PMGet
s int he helper?curved-television-6568
11/12/2021, 12:33 PMbitter-ability-32190
11/12/2021, 12:33 PMcurved-television-6568
11/12/2021, 12:34 PMbitter-ability-32190
11/12/2021, 12:35 PMcurved-television-6568
11/12/2021, 12:36 PMbitter-ability-32190
11/12/2021, 12:38 PMgenerate_targets_from_*
function to src/python/pants/backend/python/target_types_rules.py
.
It has slightly different way of collecting sources, so I thought using a helper would not only clean up some duplication but allow me to highlight the difference (that way whoever adds the 5th one doesn't copy mine)curved-television-6568
11/12/2021, 12:41 PMcurved-television-6568
11/12/2021, 12:43 PMcurved-television-6568
11/12/2021, 12:43 PMcurved-television-6568
11/12/2021, 12:44 PMbitter-ability-32190
11/12/2021, 12:46 PMhappy-kitchen-89482
11/12/2021, 2:54 PMawait Get
then it needs to be an async @rule
and you need to await Get
it, yes.