Little inconsistency on the <subsystems docs page>...
# plugins
f
Little inconsistency on the subsystems docs page: it says you can use
./pants help $subsystem_name
right after subclassing
Subsystem
but that doesn't seem to work. It looks like you need to consume that subsystem in a registered rule for pants to pick it up. My guess would be you'd need a dummy or trival rule to make this work, but I don't know if that's a good recommendation
h
Oh good catch (Alternatively, you can say
SubsystemRule(MySubsystem)
(from pants.engine.rules), and ensure that’s included in the
rules()
entry point in
register.py
.
collect_rules()
will automatically set that up for you by inspecting the signature of your rules and seeing if they subclass
Subsystem
)
👍 1