diff options
author | 2018-07-23 03:09:09 -0700 | |
---|---|---|
committer | 2018-07-23 03:10:18 -0700 | |
commit | dc1148ebd8b7629f9668924eece5da47370c4d5e (patch) | |
tree | 17a89997676dbcf4be6179bc926c9040f7ec5a21 /src/main | |
parent | e1d9b58608a6b7a35b59a598d495cb20df3f0eac (diff) |
Remove load() from the list of build functions
load() is not a function, but a keyword. It's already
documented in other places (https://docs.bazel.build/versions/master/skylark/concepts.html#loading-an-extension).
RELNOTES: None.
PiperOrigin-RevId: 205636295
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm index 0b2ea0ead2..2cf986fbae 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm +++ b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm @@ -26,62 +26,6 @@ title: Functions </div> #end <!-- ================================================================= - load() - ================================================================= ---> - -<h2 id="load">load</h2> - -<pre>load(label, symbols...)</pre> - -<p><code>load()</code> is a statement that imports definitions from a - Skylark module (<code>.bzl</code> file). For example: -</p> - -<pre class="code"> -load("//path/to/rules:my_rules.bzl", "my_rules") - -build_test(name = ...) -</pre> - -<p>This will execute the - <a href="{{ page.version_prefix }}/docs/skylark/index.html">Skylark</a> - module <code>//path/to/rules:my_rules.bzl</code> and import the symbol - <code>my_rules</code> in the local environment. This is useful for - using macros or for sharing values between multiple BUILD files. By - using more arguments, you can load more symbols at once.</p> - -<pre class="code"> -load("//path/to/rules:my_defs.bzl", "COMPILER_FLAGS", "LINKER_FLAGS") -</pre> - -<p> - In <code>load()</code> statement, keyword arguments have special meaning. - They can be used to import a value from a <code>.bzl</code> file under a new - name. For example: -</p> - -<pre class="code"> -load("//path/to/rules:my_defs.bzl", BUILD_DEF_COMPILER_FLAGS="COMPILER_FLAGS", "LINKER_FLAGS") -</pre> -<p> -This will make <code>COMPILER_FLAGS</code> exported from -<code>my_defs.bzl</code> available under the name -<code>BUILD_DEF_COMPILER_FLAGS</code> in the current file. -</p> - -<p> - The label must refer to an existing package. For example, for the above - statement to work, <code>path/to/rules/BUILD</code> must exist (an empty - file is sufficient) The name of the file must have the suffix - <code>.bzl</code>. If the specified label is in the relative label syntax - (<code>:a/b.bzl</code>), it will be resolved relative to the package of the - file the <code>load</code> statement is in. <code>load</code> statements - don't respect visibility: there is no need to use <code>exports_files</code> - to make the <code>.bzl</code> file visible. -</p> - -<!-- ================================================================= package() ================================================================= --> |