aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/skylark/cookbook.md
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-04-09 14:06:33 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-04-09 15:37:07 +0000
commit1af8791abac822ef0150d9369f029009780a1fda (patch)
treee71d90ec3259caa4a0e3170bc7354f16f152803f /site/docs/skylark/cookbook.md
parent7ace1f20526e8ab30deaea2ac61cbb61da1d3d0c (diff)
Fix Skylark cookbook example
-- MOS_MIGRATED_REVID=90708017
Diffstat (limited to 'site/docs/skylark/cookbook.md')
-rw-r--r--site/docs/skylark/cookbook.md9
1 files changed, 3 insertions, 6 deletions
diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md
index 2aa2401510..dc1670372c 100644
--- a/site/docs/skylark/cookbook.md
+++ b/site/docs/skylark/cookbook.md
@@ -98,12 +98,9 @@ def impl(ctx):
# This prints the labels of the deps attribute.
print("There are %d deps" % len(ctx.attr.deps))
for i in ctx.attr.deps:
- print("- %s (name %s, from package %s)" % (i, i.name, i.package))
-
- # Print the list of files in the deps attribute.
- # A label can represent any number of files (possibly 0).
- for i in ctx.files.deps:
- print(i.path)
+ print("- %s" % i.label)
+ # A label can represent any number of files (possibly 0).
+ print(" files = %s" % [f.path for f in i.files])
printer = rule(
implementation=impl,