Clarify InvocationPolicy origins.
Some policies can come from the module API, and some come from the user via
startup argument. Clarify which one is which.
--
PiperOrigin-RevId: 151324618
MOS_MIGRATED_REVID=151324618
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 efe5a21..368b66b 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
@@ -139,8 +139,7 @@
private final OptionsProvider startupOptionsProvider;
private final ProjectFile.Provider projectFileProvider;
- @Nullable
- private final InvocationPolicy invocationPolicy;
+ @Nullable private final InvocationPolicy moduleInvocationPolicy;
private final String defaultsPackageContent;
private final SubscriberExceptionHandler eventBusExceptionHandler;
private final String productName;
@@ -163,7 +162,7 @@
Iterable<BlazeModule> blazeModules,
SubscriberExceptionHandler eventBusExceptionHandler,
ProjectFile.Provider projectFileProvider,
- InvocationPolicy invocationPolicy,
+ InvocationPolicy moduleInvocationPolicy,
Iterable<BlazeCommand> commands,
String productName,
PathConverter pathToUriConverter) {
@@ -173,7 +172,7 @@
this.packageFactory = pkgFactory;
this.projectFileProvider = projectFileProvider;
- this.invocationPolicy = invocationPolicy;
+ this.moduleInvocationPolicy = moduleInvocationPolicy;
this.ruleClassProvider = ruleClassProvider;
this.configurationFactory = configurationFactory;
@@ -187,7 +186,7 @@
this.eventBusExceptionHandler = eventBusExceptionHandler;
this.defaultsPackageContent =
- ruleClassProvider.getDefaultsPackageContent(getInvocationPolicy());
+ ruleClassProvider.getDefaultsPackageContent(getModuleInvocationPolicy());
CommandNameCache.CommandNameCacheInstance.INSTANCE.setCommandNameCache(
new CommandNameCacheImpl(getCommandMap()));
this.productName = productName;
@@ -250,8 +249,8 @@
}
@Nullable
- public InvocationPolicy getInvocationPolicy() {
- return invocationPolicy;
+ public InvocationPolicy getModuleInvocationPolicy() {
+ return moduleInvocationPolicy;
}
/**