BEP: move configuration-independent information to TargetConfigured event
Some information about a target is configuration independent and therefore can
already be provided at a target level (i.e., in the TargetConfigured event). Do
so, to have that information available earlier and, once the deprecation period
is over, avoid redundant information in the stream.
Change-Id: I8021ce3dd2a8168d409ea513190c4e3a349dbc2f
PiperOrigin-RevId: 164967059
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index 87cb74a..559cad1 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -507,8 +507,8 @@
for (TargetAndConfiguration pair : topLevelTargetsWithConfigs) {
byLabel.put(pair.getLabel(), pair.getConfiguration());
}
- for (Label label : byLabel.keySet()) {
- eventBus.post(new TargetConfiguredEvent(label, byLabel.get(label)));
+ for (Target target : targets) {
+ eventBus.post(new TargetConfiguredEvent(target, byLabel.get(target.getLabel())));
}
List<ConfiguredTargetKey> topLevelCtKeys = Lists.transform(topLevelTargetsWithConfigs,