buck2
buck2 copied to clipboard
DefaultInfo docs: `attrs.output()` does not exist
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.
Thank you for reporting. We don't have attrs.output() any more. I will update it.
The meta-issue of this is that the examples in the documentation need to be doc-tested somehow.
That's true. We need to find way to do that. Also the idea for the example can provide a env for user to be run for users