private void writeObject(ObjectOutputStream out) throws IOException {
    // It helps to flatten the transitiveSuccessfulPkgs nested set as it has lots of duplicates.
    Set<PackageIdentifier> successfulPkgs = transitiveSuccessfulPkgs.toSet();
    out.writeInt(successfulPkgs.size());
    for (PackageIdentifier pkg : successfulPkgs) {
      out.writeObject(pkg);
    }

    out.writeObject(transitiveUnsuccessfulPkgs);
    // Deliberately do not write out transitiveTargets. There is a lot of those and they drive
    // serialization costs through the roof, both in terms of space and of time.
    // TODO(bazel-team): Deal with this properly once we have efficient serialization of NestedSets.
    out.writeObject(transitiveRootCauses);
    out.writeObject(errorLoadingTarget);
    out.writeObject(transitiveConfigFragments);
  }
Exemple #2
0
 public Set<?> expandedSet() {
   return set.toSet();
 }