Remove the outputPath parameter from BlazeModule.getFileSystem.
It's never used, and it's tricky to run with multiple different file systems
in the same process -> remove it to simplify.
--
MOS_MIGRATED_REVID=129858142
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeModule.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeModule.java
index 08e827b..634a0b5 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeModule.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeModule.java
@@ -38,7 +38,6 @@
import com.google.devtools.build.lib.util.Clock;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Path;
-import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsClassProvider;
import com.google.devtools.common.options.OptionsProvider;
@@ -59,7 +58,7 @@
/**
* Returns the extra startup options this module contributes.
*
- * <p>This method will be called at the beginning of Blaze startup (before #blazeStartup).
+ * <p>This method will be called at the beginning of Blaze startup (before {@link #globalInit}).
*/
public Iterable<Class<? extends OptionsBase>> getStartupOptions() {
return ImmutableList.of();
@@ -69,8 +68,11 @@
* Called before {@link #getFileSystem} and {@link #blazeStartup}.
*
* <p>This method will be called at the beginning of Blaze startup.
+ *
+ * @param startupOptions the server's startup options
+ *
+ * @throws AbruptExitException to shut down the server immediately
*/
- @SuppressWarnings("unused")
public void globalInit(OptionsProvider startupOptions) throws AbruptExitException {
}
@@ -80,9 +82,10 @@
*
* <p>This method will be called at the beginning of Blaze startup (in-between #globalInit and
* #blazeStartup).
+ *
+ * @param startupOptions the server's startup options
*/
- @SuppressWarnings("unused")
- public FileSystem getFileSystem(OptionsProvider startupOptions, PathFragment outputPath) {
+ public FileSystem getFileSystem(OptionsProvider startupOptions) {
return null;
}
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 851f647..eb3e6a6 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
@@ -882,11 +882,9 @@
"Bad --output_base option specified: '" + outputBase + "'");
}
- PathFragment outputPathFragment = BlazeDirectories.outputPathFromOutputBase(
- outputBase, workspaceDirectory, startupOptions.deepExecRoot, productName);
FileSystem fs = null;
for (BlazeModule module : blazeModules) {
- FileSystem moduleFs = module.getFileSystem(options, outputPathFragment);
+ FileSystem moduleFs = module.getFileSystem(options);
if (moduleFs != null) {
Preconditions.checkState(fs == null, "more than one module returns a file system");
fs = moduleFs;