diff options
author | 2018-05-16 09:13:27 -0700 | |
---|---|---|
committer | 2018-05-16 09:15:11 -0700 | |
commit | 7a491b7e62a033aa5f0f8efdfd77dac5ec5fa1b3 (patch) | |
tree | e52e0c6ffb782a25e49089a6b66963337bb5f7ec /src/main/java/com/google/devtools/build/lib/runtime | |
parent | cd76c1f8a9a645f0ecc2a95a66548b7178b35155 (diff) |
Port bazelrc flags into their own module.
This way the documentation logs them correctly as named "bazel," and describes the correct behavior.
Needed for #4502.
RELNOTES: None.
PiperOrigin-RevId: 196837021
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
4 files changed, 5 insertions, 29 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java index 6844412463..54d409979f 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java @@ -265,7 +265,7 @@ public class BlazeCommandDispatcher { // Record the command's starting time for use by the commands themselves. env.recordCommandStartTime(firstContactTime); - // Temporary: there is one module that outputs events during beforeCommand, but the reporter + // Temporary: there are modules that output events during beforeCommand, but the reporter // isn't setup yet. Add the stored event handler to catch those events. env.getReporter().addHandler(storedEventHandler); for (BlazeModule module : runtime.getBlazeModules()) { 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 9ccef65167..51cfb2783e 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 @@ -960,11 +960,11 @@ public final class BlazeRuntime { /** * Parses the command line arguments into a {@link OptionsParser} object. * - * <p>This function needs to parse the --option_sources option manually so that the real option + * <p>This function needs to parse the --option_sources option manually so that the real option * parser can set the source for every option correctly. If that cannot be parsed or is missing, * we just report an unknown source for every startup option. */ - private static OptionsProvider parseOptions( + private static OptionsProvider parseStartupOptions( Iterable<BlazeModule> modules, List<String> args) throws OptionsParsingException { ImmutableList<Class<? extends OptionsBase>> optionClasses = BlazeCommandUtils.getStartupOptions(modules); @@ -1006,7 +1006,7 @@ public final class BlazeRuntime { private static BlazeRuntime newRuntime(Iterable<BlazeModule> blazeModules, List<String> args, Runnable abruptShutdownHandler) throws AbruptExitException, OptionsParsingException { - OptionsProvider options = parseOptions(blazeModules, args); + OptionsProvider options = parseStartupOptions(blazeModules, args); for (BlazeModule module : blazeModules) { module.globalInit(options); } diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java index 90684c5946..1ec6e13d88 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java @@ -300,30 +300,6 @@ public class BlazeServerStartupOptions extends OptionsBase { public boolean ignoreAllRcFiles; @Option( - name = "blazerc", - defaultValue = "null", // NOTE: purely decorative, rc files are read by the client. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.CHANGES_INPUTS}, - valueHelp = "<path>", - help = - "The location of the .%{product}rc file containing default values of " - + "Blaze command options. By default, Blaze first checks the current directory, then " - + "the user's home directory, and then looks for a file named .$(basename $0)rc " - + "(i.e. .%{product}rc). Use /dev/null to disable the search for a %{product}rc file, " - + "e.g. in release builds." - ) - public String blazerc; - - @Option( - name = "master_blazerc", - defaultValue = "true", // NOTE: purely decorative, rc files are read by the client. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.CHANGES_INPUTS}, - help = "If this option is false, the master %{product}rc next to the binary is not read." - ) - public boolean masterBlazerc; - - @Option( name = "fatal_event_bus_exceptions", defaultValue = "false", // NOTE: only for documentation, value is always passed by the client. documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java index 1bf99be2c4..b01706f3c4 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java @@ -305,7 +305,7 @@ public abstract class CommandLineEvent implements BuildEventWithOrderConstraint /** * Returns the effective startup options. * - * <p>Since in this command line the command options include invocation policy's and blazercs' + * <p>Since in this command line the command options include invocation policy's and rcs' * contents expanded fully, the list of startup options should prevent reapplication of these * contents. * |