hundreds-father-404
05/21/2022, 3:19 AM./pants test project
runs tests in project
and project/subdir
because you are using python_tests(sources=['**/*_test.py'])
b) ./pants list project
only shows "atom" targets and generated targets: not target generators. You have to use project:
to include the target generators
I can't find a way to avoid both problemshundreds-father-404
05/21/2022, 3:21 AM./pants test project
, more offensive. i think intuitively, you would expect to only run tests in the folder and not subdirs
It's a bummer to not show target generators w/ project introspection, but doesn't seem like a huge deal. Target generators are only for boilerplate reduction. And we keep moving that way:
1. Soon, they won't even have addresses 95% of the time! (name=
proposal)
2. Already, they don't have most fields anymore like dependencies
and interpreter_constraints
because they are "moved"hundreds-father-404
05/21/2022, 3:27 AMhundreds-father-404
05/21/2022, 3:43 AMbitter-ability-32190
05/21/2022, 10:26 AMwitty-crayon-22786
05/21/2022, 4:37 PMwitty-crayon-22786
05/21/2022, 4:38 PM./pants test $project
actually doing the recursive thing makes sensewitty-crayon-22786
05/21/2022, 4:39 PMWhich means a) is very offensivei don’t think so? because you won’t have declared recursive globs
happy-kitchen-89482
05/21/2022, 4:48 PM./pants test project
runs recursively or not then we're forcing all users to be aware of the nuances of targets. And the target is no longer "metadata attached to source files" but also binds those files together in non-obvious ways. I could change the structure of my targets in a way that until today was a no-op and suddenly different sets of tests run for the same CLI command.hundreds-father-404
05/21/2022, 4:48 PM./pants test $project
, why not just do ./pants test project::
?hundreds-father-404
05/21/2022, 4:49 PM./pants test project:
if you want the current behaviorhappy-kitchen-89482
05/21/2022, 4:51 PMhappy-kitchen-89482
05/21/2022, 4:51 PMhundreds-father-404
05/21/2022, 4:52 PMname=
to be set), your options would be:
• address literal spec
• dir:
• dir::
bitter-ability-32190
05/21/2022, 4:52 PMproject
is the name of a directory. It might be the name of the project. But it also might not be. But it's always a directory. So do the normal directory thing.witty-crayon-22786
05/21/2022, 4:57 PMdir:
still exists I don't feel strongly about it.hundreds-father-404
05/21/2022, 4:58 PMdir:
stlil exists and this was surprisingly very very easy to implement 🙂bitter-ability-32190
05/21/2022, 5:21 PMwitty-crayon-22786
05/21/2022, 5:38 PMdir
vs dir:
to be different is maybe relevant too... that's a signal of intent.bitter-ability-32190
05/21/2022, 5:43 PM