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

hundreds-breakfast-49010

07/22/2019, 6:51 PM
anyway, either way, it should have a description to be rendered there, right?
./pants goals
shouldn't care wehther the engine is v1 or v2?
a

average-vr-56795

07/22/2019, 6:57 PM
Yeah, it should. My guess is that the problem is that
Validate
has no pydoc, and IIRC the v1 goal discovery for
./pants goals
skips things with no pydoc; my guess is the v2 goal discovery for
./pants goals
doesn’t skip them.
Copy code
pants$ rg -A1 "class List.*Goal"
src/python/pants/rules/core/list_targets.py
13:class List(LineOriented, Goal):
14-  """Lists all targets matching the target specs."""

pants-plugins/src/python/internal_backend/rules_for_testing/register.py
10:class ListAndDieForTesting(Goal):
11-  """A fast and deadly variant of `./pants list`."""
pants$ rg -A1 "class Validate.*Goal"
src/python/pants/backend/project_info/rules/source_file_validator.py
31:class Validate(Goal):
32-  name = 'validate'
h

hundreds-breakfast-49010

07/22/2019, 7:43 PM
if I just type
./pants goals
without giving any other flags, is that doing v1 or v2 goal discovery?
a

average-vr-56795

07/22/2019, 9:23 PM
Yes, I think
h

hundreds-breakfast-49010

07/22/2019, 9:50 PM
so, registering v1 goals happens in
pants/core_tasks/register.py
right?
and I think the v2 equivalent of this is
pants/rules/core/register.py
but I can't fiugre out where that
rules()
is getting invoked
ah ok it's coming from
extension_loader.py