```from pants.engine.goal import Goal, GoalSubsyst...
# general
l
Copy code
from pants.engine.goal import Goal, GoalSubsystem, Outputting
from pants.engine.rules import goal_rule, collect_rules
from pants.engine.console import Console

class HelloWorldSubsystem(Outputting, GoalSubsystem):
    name = "hello-world"
    help = "An example goal."



class HelloWorld(Goal):
    subsystem_cls = HelloWorldSubsystem

@goal_rule
async def hello_world(
    console: Console, hello_world_subsystem: HelloWorldSubsystem
) -> HelloWorld:
    with hello_world_subsystem.output(console) as write_stdout:
        write_stdout("Hello world!")
    return HelloWorld(exit_code=0)

def rules():
    return collect_rules()
l
Thanks
Ok, this is yet another piece of documentation that is available in
main
but not in the 2.17.x documentation.
I can't blame you guys though, git makes this kind of thing hard, and unfortunately it is so entrenched now that it's unlikely to go away anytime soon
c
I think if the migration off of readme.com goes through we would at least get a "latest/main/trunk" version of the docs "for free".
l
Yay