BlazeModule.workspaceInit: also pass the BlazeRuntime to the call
In order for BlazeModule.workspaceInit to be self-contained, also pass in the
BlazeRuntime; we have use cases where this context is relevant, and there's
currently no other way to get a reference to the BlazeRuntime.
PiperOrigin-RevId: 158861142
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index a43ec2b..94c38de 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -199,7 +199,7 @@
Preconditions.checkState(this.workspace == null);
WorkspaceBuilder builder = new WorkspaceBuilder(directories, binTools);
for (BlazeModule module : blazeModules) {
- module.workspaceInit(directories, builder);
+ module.workspaceInit(this, directories, builder);
}
this.workspace = builder.build(
this, packageFactory, ruleClassProvider, getProductName(), eventBusExceptionHandler);