diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java index 473153c00c1544..c33f4331cef431 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Package.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java @@ -2092,14 +2092,10 @@ public Package finishBuild() { return pkg; } - // Freeze targets and distributions. + // Freeze rules, compacting their attributes' representations. for (Rule rule : getRules()) { rule.freeze(); } - ruleLabels = null; - rulesCreatedInMacros = null; - outputFilePrefixes = null; - targets = Maps.unmodifiableBiMap(targets); // Now all targets have been loaded, so we validate the group's member environments. for (EnvironmentGroup envGroup : ImmutableSet.copyOf(environmentGroups.values())) { diff --git a/src/main/java/com/google/devtools/build/lib/packages/TargetRegistrationEnvironment.java b/src/main/java/com/google/devtools/build/lib/packages/TargetRegistrationEnvironment.java index 2bb0951ef69e33..e7b0e4d1021ee4 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/TargetRegistrationEnvironment.java +++ b/src/main/java/com/google/devtools/build/lib/packages/TargetRegistrationEnvironment.java @@ -167,7 +167,7 @@ private enum NameConflictCheckingPolicy { *
This field is null if name conflict checking is disabled. It is also null after the package
* is built. The content of the map is manipulated only in {@link #checkRuleAndOutputs}.
*/
- @Nullable protected Map