Skip to content

Commit

Permalink
Update skylark docs to use build labels consistently for skylark loads
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=120339643
  • Loading branch information
Googler authored and damienmg committed Apr 21, 2016
1 parent db4b11f commit ec4042d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions site/docs/skylark/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,15 +24,15 @@ 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
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.
Expand Down
2 changes: 1 addition & 1 deletion site/docs/skylark/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ec4042d

Please sign in to comment.