bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.07k stars 4.04k forks source link

Documentation issue: Rules Tutorial #14905

Open rosasco-wk opened 2 years ago

rosasco-wk commented 2 years ago

Documentation URL: https://docs.bazel.build/versions/main/skylark/rules-tutorial.html

The above page says: "In the implementation function, the target will be accessible as a Target object. For example, view the files returned by the target using Target.files."

This needs a clarification / supporting example. Target.files isn't defined in the implementation function.

rosasco-wk commented 2 years ago

More generally, the segue to the "Dependencies" section could be a lot smoother. The first thing mentioned is "dependency attributes" without defining dependency attributes. Would be a good idea to have a simple example of establishing a dependency for the rule by showing an example of a dependency attribute in use.

brandjon commented 1 year ago

Wait, this is rules api.