resolved file: properly close the writer
When writing a resolved file, properly close it before returning.
In this way, we do not have to rely on implicit closes causing races
(especially as `bazel shutdown` is racy as well).
@@ -82,6 +82,7 @@ public final class RepositoryResolvedModule extends BlazeModule {
EXPORTED_NAME
+ " = "
+ Printer.getWorkspacePrettyPrinter().repr(resultBuilder.build()));
+ writer.close();
} catch (IOException e) {
logger.warning("IO Error writing to file " + resolvedFile + ": " + e);
}
