File tree Expand file tree Collapse file tree 4 files changed +10
-16
lines changed
src/main/java/com/google/devtools/build/lib Expand file tree Collapse file tree 4 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ java_library(
5959 ":store" ,
6060 "//src/main/java/com/google/devtools/build/lib:build-request-options" ,
6161 "//src/main/java/com/google/devtools/build/lib:runtime" ,
62+ "//src/main/java/com/google/devtools/build/lib:runtime/blaze_service" ,
6263 "//src/main/java/com/google/devtools/build/lib:runtime/command_line_path_factory" ,
6364 "//src/main/java/com/google/devtools/build/lib/actions" ,
6465 "//src/main/java/com/google/devtools/build/lib/actions:action_input_helper" ,
Original file line number Diff line number Diff line change 8282import com .google .devtools .build .lib .runtime .BlazeModule ;
8383import com .google .devtools .build .lib .runtime .BlazeRuntime ;
8484import com .google .devtools .build .lib .runtime .BlazeServerStartupOptions ;
85+ import com .google .devtools .build .lib .runtime .BlazeService ;
8586import com .google .devtools .build .lib .runtime .BlockWaitingModule ;
8687import com .google .devtools .build .lib .runtime .BuildEventArtifactUploaderFactory ;
8788import com .google .devtools .build .lib .runtime .CommandEnvironment ;
@@ -191,7 +192,8 @@ public ImmutableList<Class<? extends OptionsBase>> getStartupOptions() {
191192 }
192193
193194 @ Override
194- public void globalInit (OptionsParsingResult startupOptions ) {
195+ public void globalInit (
196+ OptionsParsingResult startupOptions , Iterable <BlazeService > blazeServices ) {
195197 outputBase = startupOptions .getOptions (BlazeServerStartupOptions .class ).outputBase ;
196198 useRemoteRepoContentsCache =
197199 startupOptions .getOptions (RemoteStartupOptions .class ).useRemoteRepoContentsCache ;
Original file line number Diff line number Diff line change @@ -78,9 +78,11 @@ public Iterable<Class<? extends OptionsBase>> getStartupOptions() {
7878 * #blazeStartup}.
7979 *
8080 * @param startupOptions the server's startup options
81+ * @param blazeServices the available services
8182 * @throws AbruptExitException to shut down the server immediately
8283 */
83- public void globalInit (OptionsParsingResult startupOptions ) throws AbruptExitException {}
84+ public void globalInit (OptionsParsingResult startupOptions , Iterable <BlazeService > blazeServices )
85+ throws AbruptExitException {}
8486
8587 /**
8688 * Returns the file system implementation used by Bazel.
@@ -153,15 +155,8 @@ public SubscriberExceptionHandler getEventBusAndAsyncExceptionHandler() {
153155 }
154156
155157 /**
156- * Called to provide the list of available Blaze services to the module.
157- *
158- * <p>This is called after {@link #getFileSystem} and before {@link #blazeStartup}.
159- */
160- public void blazeServicesAvailable (Iterable <BlazeService > blazeServices ) {}
161-
162- /**
163- * Called when Bazel starts up after {@link #getStartupOptions}, {@link #globalInit}, {@link
164- * #getFileSystem}, and {@link #blazeServicesAvailable}.
158+ * Called when Bazel starts up after {@link #getStartupOptions}, {@link #globalInit} and {@link
159+ * #getFileSystem}.
165160 *
166161 * @param startupOptions the server's startup options
167162 * @param versionInfo the Bazel version currently running
Original file line number Diff line number Diff line change @@ -1352,7 +1352,7 @@ private static BlazeRuntime newRuntime(
13521352 }
13531353
13541354 for (BlazeModule module : blazeModules ) {
1355- module .globalInit (options );
1355+ module .globalInit (options , blazeServices );
13561356 }
13571357
13581358 String productName = startupOptions .productName .toLowerCase (Locale .US );
@@ -1711,10 +1711,6 @@ public BlazeRuntime build() throws AbruptExitException {
17111711 }
17121712 }
17131713
1714- var blazeServicesCopy = ImmutableList .copyOf (blazeServices );
1715- for (BlazeModule module : blazeModules ) {
1716- module .blazeServicesAvailable (blazeServicesCopy );
1717- }
17181714 for (BlazeModule module : blazeModules ) {
17191715 module .blazeStartup (
17201716 startupOptionsProvider ,
You can’t perform that action at this time.
0 commit comments