aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jon Brandvein <brandjon@google.com>2016-11-10 15:21:25 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-11-10 16:17:38 +0000
commit2982609a07d9b22f55c1421a97379de161bb791d (patch)
treebbdb8fae32105632470703a1ac07892d8d3515a1
parent314193a80a60a9395a90001c8a19c0c6077564de (diff)
Fix a bunch of typos
-- MOS_MIGRATED_REVID=138757881
-rw-r--r--src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm4
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Environment.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/LValue.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Mutability.java4
9 files changed, 14 insertions, 14 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 293b043302..05ab87ae04 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
@@ -61,8 +61,8 @@ load(":build_defs.bzl", "COMPILER_FLAGS", "LINKER_FLAGS")
statement to work, <code>tools/build_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 the file
- the <code>load</code> statement is in.
+ (<code>:a/b.bzl</code>), it will be resolved relative to the package of the
+ file the <code>load</code> statement is in.
</p>
<p>
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
index 56c815f7b6..837bad3b44 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
@@ -691,7 +691,7 @@ public class ConfiguredRuleClassProvider implements RuleClassProvider {
* interpreted as native TransitiveInfoProvider instances of type (map value).
*
* <p>That is, if this map contains "dummy" -> DummyProvider.class, a "dummy" entry in a skylark
- * rule implementations returned struct will be exported from that ConfiguredTarget as a
+ * rule implementation's returned struct will be exported from that ConfiguredTarget as a
* DummyProvider.
*/
public ImmutableBiMap<String, Class<? extends TransitiveInfoProvider>>
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
index 0050178c4c..def3f5220d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
@@ -286,7 +286,7 @@ public class SkylarkRuleClassFunctions {
+ "The dictionary key becomes an attribute in <code>ctx.outputs</code>. "
+ "Similar to computed dependency rule attributes, you can also specify the name "
+ "of a function that returns the dictionary. This function can access all rule "
- + "attributes that are listed as parameters in its function signature."
+ + "attributes that are listed as parameters in its function signature. "
+ "For example, <code>outputs = _my_func<code> with <code>def _my_func(srcs, deps):"
+ "</code> has access to the attributes 'srcs' and 'deps' (if defined)."
),
@@ -469,7 +469,7 @@ public class SkylarkRuleClassFunctions {
+ "(see <a href=\"attr.html\">attr</a> module). "
+ "Aspect attributes are available to implementation function as fields of ctx parameter. "
+ "Implicit attributes starting with <code>_</code> must have default values, and have "
- + "type <code>label</code> or <code>label_list</code>."
+ + "type <code>label</code> or <code>label_list</code>. "
+ "Explicit attributes must have type <code>string</code>, and must use the "
+ "<code>values</code> restriction. If explicit attributes are present, the aspect can "
+ "only be used with rules that have attributes of the same name and type, with valid "
@@ -641,7 +641,7 @@ public class SkylarkRuleClassFunctions {
PackageContext pkgContext = (PackageContext) env.lookup(PackageFactory.PKG_CONTEXT);
if (pkgContext == null) {
throw new EvalException(ast.getLocation(),
- "Cannot instantiate a rule when loading a .bzl file. Rules can only called from "
+ "Cannot instantiate a rule when loading a .bzl file. Rules can only be called from "
+ "a BUILD file (possibly via a macro).");
}
return RuleFactory.createAndAddRule(
@@ -695,7 +695,7 @@ public class SkylarkRuleClassFunctions {
* All classes of values that need special processing after they are exported
* from an extension file.
*
- * Order in list list is significant: all {@link }SkylarkAspect}s need to be exported
+ * Order in list is significant: all {@link SkylarkAspect}s need to be exported
* before {@link RuleFunction}s etc.
*/
private static final List<Class<? extends SkylarkExportable>> EXPORTABLES =
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
index ebd4db681c..ae6a630955 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
@@ -92,7 +92,7 @@ public final class SkylarkRuleContext {
public static final String EXECUTABLE_DOC =
"A <code>struct</code> containing executable files defined in label type "
+ "attributes marked as <code>executable=True</code>. The struct fields correspond "
- + "to the attribute names. Each struct value is always a <code>file</code>s or "
+ + "to the attribute names. Each value in the struct is either a <code>file</code> or "
+ "<code>None</code>. If an optional attribute is not specified in the rule "
+ "then the corresponding struct value is <code>None</code>. If a label type is not "
+ "marked as <code>executable=True</code>, no corresponding struct field is generated.";
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java
index 015b167a7e..75c5093741 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java
@@ -236,7 +236,7 @@ public class SkylarkRuleImplementationFunctions {
// When we use a shell command, add an empty argument before other arguments.
// e.g. bash -c "cmd" '' 'arg1' 'arg2'
// bash will use the empty argument as the value of $0 (which we don't care about).
- // arg1 and arg2 will be $1 and $2, as a user exects.
+ // arg1 and arg2 will be $1 and $2, as a user expects.
builder.addArgument("");
}
builder.addArguments(arguments.getContents(String.class, "arguments"));
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java b/src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java
index bb6d2690e1..ac5e80fd76 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java
@@ -147,7 +147,7 @@ public final class DottedVersion implements Comparable<DottedVersion> {
@Override
@SkylarkCallable(name = "compare_to",
doc = "Compares based on most signifigant (first) not-matching version component. "
- + "So, for example, 1.2.3 > 1.2.4")
+ + "So, for example, 1.2.3 < 1.2.4")
public int compareTo(DottedVersion other) {
int maxComponents = Math.max(components.size(), other.components.size());
for (int componentIndex = 0; componentIndex < maxComponents; componentIndex++) {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Environment.java b/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
index 08614ace39..fffacb65dc 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
@@ -94,7 +94,7 @@ public final class Environment implements Freezable {
* is closed, it becomes immutable, including the Frame, which can be shared in other
* {@link Environment}-s. Indeed, a {@link UserDefinedFunction} will close over the global
* Frame of its definition {@link Environment}, which will thus be reused (immutably)
- * in all any {@link Environment} in which this function is called, so it's important to
+ * in any {@link Environment} in which this function is called, so it's important to
* preserve the {@link Mutability} to make sure no Frame is modified after it's been finalized.
*/
public static final class Frame implements Freezable {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/LValue.java b/src/main/java/com/google/devtools/build/lib/syntax/LValue.java
index ccd28f588e..02f6084f52 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/LValue.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/LValue.java
@@ -101,7 +101,7 @@ public class LValue implements Serializable {
if (o instanceof SkylarkDict) {
SkylarkDict<Object, Object> dict = (SkylarkDict<Object, Object>) o;
dict.put(key, value, loc, env);
- } else if (o instanceof SkylarkList) {
+ } else if (o instanceof SkylarkList) {
SkylarkList<Object> list = (SkylarkList<Object>) o;
list.set(key, value, loc, env);
} else {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Mutability.java b/src/main/java/com/google/devtools/build/lib/syntax/Mutability.java
index 44b3605dd5..21d5c28de3 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Mutability.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Mutability.java
@@ -236,8 +236,8 @@ public final class Mutability implements AutoCloseable, Serializable {
// Consider an {@link Environment} e1, in which is created {@link UserDefinedFunction} f1,
// that closes over some variable v1 bound to list l1. If somehow, via the magic of callbacks,
- // f1 or l1 is passed as argument to some function f2 evaluated in {@link environment} e2
- // while e1 is be mutable, e2, being a different {@link Environment}, should not be
+ // f1 or l1 is passed as an argument to some function f2 evaluated in {@link Environment} e2
+ // while e1 is still mutable, then e2, being a different {@link Environment}, should not be
// allowed to mutate objects from e1. It's a bug, that shouldn't happen in our current code
// base, so we throw an AssertionError. If in the future such situations are allowed to happen,
// then we should throw a MutabilityException instead.