Skip to content

DefaultInfo docs: attrs.output() does not exist #1087

@lf-

Description

@lf-

https://buck2.build/docs/api/build/DefaultInfo/ gives the following in an example:

foo_binary = rule(
    impl=impl,
    attrs={
        "srcs": attrs.list(attrs.source()),
        "out": attrs.output(),
        "stripped": attrs.output(),
        "debug_info": attrs.output(),
        "_cc": attrs.dep(default="//tools:cc", providers=[RunInfo]),
        "_strip_script": attrs.dep(default="//tools:strip", providers=[RunInfo])
)

Besides the missing } at the end there, there's an attrs.output() that is not a thing that exists. I am not sure what it is intended to be either.

The meta-issue of this is that the examples in the documentation need to be doc-tested somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions