https://pantsbuild.org/ logo
#development
Title
# development
w

wide-energy-11069

09/05/2019, 8:03 PM
I have this in a register.py
Copy code
class DummyProduct:
  pass

@rule(DummyProduct, [])
def dummy():
  yield DummyProduct()


def rules():
  return [
    dummy,
  ]
what command should I run to trigger it?
e

enough-analyst-54434

09/05/2019, 8:48 PM
Only @console_rule rules are addressable from the CLI and they take their name from their Goal subclass return type: https://github.com/pantsbuild/pants/blob/master/src/python/pants/rules/core/test.py#L21-L28
For dev purposes it might be nice to support spelling the full rule function name. Maybe rule@foo.bar.baz where the rule is the baz function in the foo.bar package.
w

wide-energy-11069

09/05/2019, 8:55 PM
got it. thanks for the example!