aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/WorkspaceStatusAction.java28
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/WriteBuildInfoHeaderAction.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/WriteBuildInfoPropertiesAction.java4
3 files changed, 3 insertions, 34 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/WorkspaceStatusAction.java b/src/main/java/com/google/devtools/build/lib/analysis/WorkspaceStatusAction.java
index 2baced77ff..6886a6ad83 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/WorkspaceStatusAction.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/WorkspaceStatusAction.java
@@ -84,18 +84,9 @@ public abstract class WorkspaceStatusAction extends AbstractAction {
public enum KeyType {
INTEGER,
STRING,
- VERBATIM,
}
/**
- * Language for keys that should be present in the build info for every language.
- */
- // TODO(bazel-team): Once this is released, migrate the only place in the depot to use
- // the BUILD_USERNAME, BUILD_HOSTNAME and BUILD_DIRECTORY keys instead of BUILD_INFO. Then
- // language-specific build info keys can be removed.
- public static final String ALL_LANGUAGES = "*";
-
- /**
* Action context required by the actions that write language-specific workspace status artifacts.
*/
public static interface Context extends ActionContext {
@@ -109,17 +100,11 @@ public abstract class WorkspaceStatusAction extends AbstractAction {
public static class Key {
private final KeyType type;
- /**
- * Should be set to ALL_LANGUAGES if the key should be present in the build info of every
- * language.
- */
- private final String language;
private final String defaultValue;
private final String redactedValue;
- private Key(KeyType type, String language, String defaultValue, String redactedValue) {
+ private Key(KeyType type, String defaultValue, String redactedValue) {
this.type = type;
- this.language = language;
this.defaultValue = defaultValue;
this.redactedValue = redactedValue;
}
@@ -128,10 +113,6 @@ public abstract class WorkspaceStatusAction extends AbstractAction {
return type;
}
- public boolean isInLanguage(String language) {
- return this.language.equals(ALL_LANGUAGES) || this.language.equals(language);
- }
-
public String getDefaultValue() {
return defaultValue;
}
@@ -140,13 +121,8 @@ public abstract class WorkspaceStatusAction extends AbstractAction {
return redactedValue;
}
- public static Key forLanguage(
- String language, KeyType type, String defaultValue, String redactedValue) {
- return new Key(type, language, defaultValue, redactedValue);
- }
-
public static Key of(KeyType type, String defaultValue, String redactedValue) {
- return new Key(type, ALL_LANGUAGES, defaultValue, redactedValue);
+ return new Key(type, defaultValue, redactedValue);
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/WriteBuildInfoHeaderAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/WriteBuildInfoHeaderAction.java
index 5d977a1dff..12739b671d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/WriteBuildInfoHeaderAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/WriteBuildInfoHeaderAction.java
@@ -109,16 +109,11 @@ public final class WriteBuildInfoHeaderAction extends AbstractFileWriteAction {
Writer writer = new OutputStreamWriter(out, UTF_8);
for (Map.Entry<String, WorkspaceStatusAction.Key> key : keys.entrySet()) {
- if (!key.getValue().isInLanguage("C++")) {
- continue;
- }
-
String value = redacted ? key.getValue().getRedactedValue()
: values.containsKey(key.getKey()) ? values.get(key.getKey())
: key.getValue().getDefaultValue();
switch (key.getValue().getType()) {
- case VERBATIM:
case INTEGER:
break;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/WriteBuildInfoPropertiesAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/WriteBuildInfoPropertiesAction.java
index 26c4cd1b84..f234819211 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/WriteBuildInfoPropertiesAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/WriteBuildInfoPropertiesAction.java
@@ -177,9 +177,7 @@ public class WriteBuildInfoPropertiesAction extends AbstractFileWriteAction {
Map<String, Key> keys) {
boolean redacted = values.isEmpty();
for (Map.Entry<String, WorkspaceStatusAction.Key> key : keys.entrySet()) {
- if (key.getValue().isInLanguage("Java")) {
- result.put(key.getKey(), gePropertyValue(values, redacted, key));
- }
+ result.put(key.getKey(), gePropertyValue(values, redacted, key));
}
}