aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/PackageSerializer.java9
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageSerializer.java b/src/main/java/com/google/devtools/build/lib/packages/PackageSerializer.java
index 835a185ceb..73cafd2a86 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/PackageSerializer.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/PackageSerializer.java
@@ -67,11 +67,10 @@ public class PackageSerializer {
* @param values the possible values of the attribute (can be a multi-value list for
* configurable attributes)
* @param explicitlySpecified whether the attribute was explicitly specified or not
- * @param includeGlobs add glob expression for attributes that contain them
*/
public static Build.Attribute getAttributeProto(Attribute attr, Iterable<Object> values,
- Boolean explicitlySpecified, boolean includeGlobs) {
- return DEFAULT.serializeAttribute(attr, values, explicitlySpecified, includeGlobs);
+ Boolean explicitlySpecified) {
+ return DEFAULT.serializeAttribute(attr, values, explicitlySpecified, /*includeGlobs=*/ false);
}
/**
@@ -176,6 +175,10 @@ public class PackageSerializer {
emitTargets(pkg.getTargets(), out);
}
+ /**
+ * Convert Attribute to proto representation. If {@code includeGlobs} is true then include
+ * globs expressions when present, omit otherwise.
+ */
@SuppressWarnings("unchecked")
private Build.Attribute serializeAttribute(Attribute attr, Iterable<Object> values,
Boolean explicitlySpecified, boolean includeGlobs) {
diff --git a/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java b/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java
index 5f87e74e24..a013b9d894 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java
@@ -138,7 +138,7 @@ public class ProtoOutputFormatter extends OutputFormatter implements UnorderedFo
}
rulePb.addAttribute(PackageSerializer.getAttributeProto(attr,
PackageSerializer.getAttributeValues(rule, attr),
- rule.isAttributeValueExplicitlySpecified(attr), /*includeGlobs=*/ false));
+ rule.isAttributeValueExplicitlySpecified(attr)));
}
Environment env = rule.getRuleClassObject().getRuleDefinitionEnvironment();
@@ -159,7 +159,7 @@ public class ProtoOutputFormatter extends OutputFormatter implements UnorderedFo
for (Entry<Attribute, Collection<Label>> entry : aspectsDependencies.asMap().entrySet()) {
rulePb.addAttribute(PackageSerializer.getAttributeProto(entry.getKey(),
Lists.<Object>newArrayList(entry.getValue()),
- /*explicitlySpecified=*/ false, /*includeGlobs=*/ false));
+ /*explicitlySpecified=*/ false));
}
// Add all deps from aspects as rule inputs of current target.
for (Label label : aspectsDependencies.values()) {