diff options
author | 2016-04-20 15:33:25 +0000 | |
---|---|---|
committer | 2016-04-21 10:57:45 +0000 | |
commit | ec4042dc36e7bad82f520986efbd4f957c68797e (patch) | |
tree | 8bf9344950fbdec2aade295e6e2c4b95023174e4 /site/docs | |
parent | db4b11f063bdf0e84dc1168cf9b4307925d04080 (diff) |
Update skylark docs to use build labels consistently for skylark loads
--
MOS_MIGRATED_REVID=120339643
Diffstat (limited to 'site/docs')
-rw-r--r-- | site/docs/skylark/concepts.md | 6 | ||||
-rw-r--r-- | site/docs/skylark/macros.md | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/site/docs/skylark/concepts.md b/site/docs/skylark/concepts.md index 3ba94e7f89..cb40991a2d 100644 --- a/site/docs/skylark/concepts.md +++ b/site/docs/skylark/concepts.md @@ -10,7 +10,7 @@ Use the `load` statement to import a symbol from a `.bzl` Skylark extension. ```python -load("/build_tools/rules/maprule", "maprule") +load("//build_tools/rules:maprule.bzl", "maprule") ``` This code will load the file `build_tools/rules/maprule.bzl` and add the @@ -24,7 +24,7 @@ top-level, i.e. they cannot be in a function body. imported symbols. ```python -load("/build_tools/rules/maprule", maprule_alias = "maprule") +load("//build_tools/rules:maprule.bzl", maprule_alias = "maprule") ``` You define multiple aliases within one `load` statement. Moreover, the argument @@ -32,7 +32,7 @@ list can contain both aliases and regular symbol names. The following example is perfectly legal (please note when to use quotation marks). ```python -load("/path/to/my_rules", "some_rule", nice_alias = "some_other_rule") +load("/path/to:my_rules.bzl", "some_rule", nice_alias = "some_other_rule") ``` Symbols starting with `_` are private and cannot be loaded from other files. diff --git a/site/docs/skylark/macros.md b/site/docs/skylark/macros.md index 94bbab9156..0facc29189 100644 --- a/site/docs/skylark/macros.md +++ b/site/docs/skylark/macros.md @@ -99,7 +99,7 @@ extract this code to a function. The BUILD file will become simply: ``` -load("/path/generator", "file_generator") +load("//path:generator.bzl", "file_generator") file_generator( name = "file", |