diff options
author | Dan Fabulich <DanFabulich@gmail.com> | 2018-07-05 16:08:06 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-05 16:10:02 -0700 |
commit | 1d35ca03b8a1c431937a9be74a9efedc15b5707a (patch) | |
tree | f1f0c20ac99ec54c450de0d238d5213758c4cbe0 /src/main | |
parent | 2b62182c9854321396d7d287e8b645261d9cda82 (diff) |
Replace instances of Blaze with Bazel.
PiperOrigin-RevId: 203300374
Change-Id: Iaa47f870ab2e0cad40a202aad2c7f9430f73c856
PiperOrigin-RevId: 203407392
Diffstat (limited to 'src/main')
27 files changed, 413 insertions, 435 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/DocgenConsts.java b/src/main/java/com/google/devtools/build/docgen/DocgenConsts.java index ebdf3f3cb2..985bf770ea 100644 --- a/src/main/java/com/google/devtools/build/docgen/DocgenConsts.java +++ b/src/main/java/com/google/devtools/build/docgen/DocgenConsts.java @@ -75,8 +75,8 @@ public class DocgenConsts { public static final String HEADER_COMMENT = Joiner.on("\n").join(ImmutableList.<String>of( "<!DOCTYPE html>", "<!--", - " This document is synchronized with Blaze releases.", - " To edit, submit changes to the Blaze source code.", + " This document is synchronized with Bazel releases.", + " To edit, submit changes to the Bazel source code.", "-->", "", "<!-- Generated by //java/com/google/devtools/build/docgen:build-encyclopedia.zip -->")); diff --git a/src/main/java/com/google/devtools/build/lib/actions/InconsistentFilesystemException.java b/src/main/java/com/google/devtools/build/lib/actions/InconsistentFilesystemException.java index e0b0f9a1c6..680fbbc32d 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/InconsistentFilesystemException.java +++ b/src/main/java/com/google/devtools/build/lib/actions/InconsistentFilesystemException.java @@ -21,9 +21,12 @@ import java.io.IOException; */ public class InconsistentFilesystemException extends IOException { public InconsistentFilesystemException(String inconsistencyMessage) { - super("Inconsistent filesystem operations. " + inconsistencyMessage + " The results of the " - + "build are not guaranteed to be correct. You should probably run 'blaze clean' and " - + "investigate the filesystem inconsistency (likely due to filesytem updates concurrent " - + "with the build)"); + super( + "Inconsistent filesystem operations. " + + inconsistencyMessage + + " The results of the " + + "build are not guaranteed to be correct. You should probably run 'bazel clean' and " + + "investigate the filesystem inconsistency (likely due to filesytem updates " + + "concurrent with the build)"); } } diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BlazeVersionInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/BlazeVersionInfo.java index 866ab6fc78..23329eddef 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/BlazeVersionInfo.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/BlazeVersionInfo.java @@ -59,9 +59,9 @@ public class BlazeVersionInfo { private static void logVersionInfo(BlazeVersionInfo info) { if (info.getSummary() == null) { - logger.warning("Blaze release version information not available"); + logger.warning("Bazel release version information not available"); } else { - logger.info("Blaze version info: " + info.getSummary()); + logger.info("Bazel version info: " + info.getSummary()); } } diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index bd2d23833b..e7443ea677 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -763,18 +763,17 @@ public class BuildConfiguration implements BuildConfigurationApi { public boolean isHost; @Option( - name = "features", - allowMultiple = true, - defaultValue = "", - documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS}, - help = - "The given features will be enabled or disabled by default for all packages. " - + "Specifying -<feature> will disable the feature globally. " - + "Negative features always override positive ones. " - + "This flag is used to enable rolling out default feature changes without a " - + "Blaze release." - ) + name = "features", + allowMultiple = true, + defaultValue = "", + documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.AFFECTS_OUTPUTS}, + help = + "The given features will be enabled or disabled by default for all packages. " + + "Specifying -<feature> will disable the feature globally. " + + "Negative features always override positive ones. " + + "This flag is used to enable rolling out default feature changes without a " + + "Bazel release.") public List<String> defaultFeatures; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java index 4ed9dbf3bd..1fa1f74911 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaPluginRule.java @@ -61,7 +61,7 @@ public final class BazelJavaPluginRule implements RuleDefinition { <p>If a rule uses an API-generating annotation processor, other rules depending on it can refer to the generated code only if their compilation actions are scheduled after the generating rule. This - attribute instructs Blaze to introduce scheduling constraints when + attribute instructs Bazel to introduce scheduling constraints when --java_header_compilation is enabled. <p><em class="harmful">WARNING: This attribute affects build performance, use it only if necessary.</em></p> diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java index be502c6024..2e61ef8cf5 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java @@ -587,8 +587,10 @@ public class ExecutionTool { // caches. LoggingUtil.logToRemote(Level.WARNING, "Failed to initialize action cache: " + e.getMessage(), e); - throw new LocalEnvironmentException("couldn't create action cache: " + e.getMessage() - + ". If error persists, use 'blaze clean'"); + throw new LocalEnvironmentException( + "couldn't create action cache: " + + e.getMessage() + + ". If error persists, use 'bazel clean'"); } } diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java index ec006b9bbd..735832bbb1 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java +++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java @@ -153,13 +153,12 @@ public class ExecutionOptions extends OptionsBase { public List<PerLabelOptions> testAttempts; @Option( - name = "test_tmpdir", - defaultValue = "null", - converter = OptionsUtils.PathFragmentConverter.class, - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = "Specifies the base temporary directory for 'blaze test' to use." - ) + name = "test_tmpdir", + defaultValue = "null", + converter = OptionsUtils.PathFragmentConverter.class, + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = "Specifies the base temporary directory for 'bazel test' to use.") public PathFragment testTmpDir; @Option( @@ -201,37 +200,35 @@ public class ExecutionOptions extends OptionsBase { public boolean useResourceAutoSense; @Option( - name = "ram_utilization_factor", - defaultValue = "67", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "Specify what percentage of the system's RAM Blaze should try to use for its subprocesses. " - + "This option affects how many processes Blaze will try to run in parallel. " - + "If you run several Blaze builds in parallel, using a lower value for " - + "this option may avoid thrashing and thus improve overall throughput. " - + "Using a value higher than the default is NOT recommended. " - + "Note that Blaze's estimates are very coarse, so the actual RAM usage may be much " - + "higher or much lower than specified. " - + "Note also that this option does not affect the amount of memory that the Blaze " - + "server itself will use. " - ) + name = "ram_utilization_factor", + defaultValue = "67", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "Specify what percentage of the system's RAM Bazel should try to use for its " + + "subprocesses. This option affects how many processes Bazel will try to run in " + + "parallel. If you run several Bazel builds in parallel, using a lower value for " + + "this option may avoid thrashing and thus improve overall throughput. " + + "Using a value higher than the default is NOT recommended. " + + "Note that Blaze's estimates are very coarse, so the actual RAM usage may be much " + + "higher or much lower than specified. " + + "Note also that this option does not affect the amount of memory that the Bazel " + + "server itself will use. ") public int ramUtilizationPercentage; @Option( - name = "local_resources", - defaultValue = "null", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "Explicitly set amount of local resources available to Blaze. " - + "By default, Blaze will query system configuration to estimate amount of RAM (in MB) " - + "and number of CPU cores available for the locally executed build actions. It would " - + "also assume default I/O capabilities of the local workstation (1.0). This options " - + "allows to explicitly set all 3 values. Note, that if this option is used, Blaze " - + "will ignore --ram_utilization_factor.", - converter = ResourceSet.ResourceSetConverter.class - ) + name = "local_resources", + defaultValue = "null", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "Explicitly set amount of local resources available to Blaze. By default, Bazel will " + + "query system configuration to estimate amount of RAM (in MB) " + + "and number of CPU cores available for the locally executed build actions. It " + + "would also assume default I/O capabilities of the local workstation (1.0). This " + + "options allows to explicitly set all 3 values. Note, that if this option is used, " + + "Bazel will ignore --ram_utilization_factor.", + converter = ResourceSet.ResourceSetConverter.class) public ResourceSet availableResources; @Option( @@ -275,17 +272,16 @@ public class ExecutionOptions extends OptionsBase { public boolean debugPrintActionContexts; @Option( - name = "cache_computed_file_digests", - defaultValue = "50000", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "If greater than 0, configures Blaze to cache file digests in memory based on their " - + "metadata instead of recomputing the digests from disk every time they are needed. " - + "Setting this to 0 ensures correctness because not all file changes can be noted " - + "from file metadata. When not 0, the number indicates the size of the cache as the " - + "number of file digests to be cached." - ) + name = "cache_computed_file_digests", + defaultValue = "50000", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "If greater than 0, configures Bazel to cache file digests in memory based on their " + + "metadata instead of recomputing the digests from disk every time they are needed. " + + "Setting this to 0 ensures correctness because not all file changes can be noted " + + "from file metadata. When not 0, the number indicates the size of the cache as the " + + "number of file digests to be cached.") public long cacheSizeForComputedFileDigests; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java index 3c7a3435ec..6d45973513 100644 --- a/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java +++ b/src/main/java/com/google/devtools/build/lib/pkgcache/PackageCacheOptions.java @@ -59,38 +59,35 @@ public class PackageCacheOptions extends OptionsBase { } @Option( - name = "package_path", - defaultValue = "%workspace%", - converter = Converters.ColonSeparatedOptionListConverter.class, - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "A colon-separated list of where to look for packages. " - + "Elements beginning with '%workspace%' are relative to the enclosing " - + "workspace. If omitted or empty, the default is the output of " - + "'blaze info default-package-path'." - ) + name = "package_path", + defaultValue = "%workspace%", + converter = Converters.ColonSeparatedOptionListConverter.class, + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "A colon-separated list of where to look for packages. " + + "Elements beginning with '%workspace%' are relative to the enclosing " + + "workspace. If omitted or empty, the default is the output of " + + "'bazel info default-package-path'.") public List<String> packagePath; @Option( - name = "show_package_location", - defaultValue = "false", - deprecationWarning = "This flag is no longer supported and will go away soon.", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "If enabled, causes Blaze to print the location on the --package_path " - + "from which each package was loaded." - ) + name = "show_package_location", + defaultValue = "false", + deprecationWarning = "This flag is no longer supported and will go away soon.", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "If enabled, causes Bazel to print the location on the --package_path " + + "from which each package was loaded.") public boolean showPackageLocation; @Option( - name = "show_loading_progress", - defaultValue = "true", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = "If enabled, causes Blaze to print \"Loading package:\" messages." - ) + name = "show_loading_progress", + defaultValue = "true", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = "If enabled, causes Bazel to print \"Loading package:\" messages.") public boolean showLoadingProgress; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/profiler/chart/AggregatingChartCreator.java b/src/main/java/com/google/devtools/build/lib/profiler/chart/AggregatingChartCreator.java index da0b4e2015..33d57fe86c 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/chart/AggregatingChartCreator.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/chart/AggregatingChartCreator.java @@ -146,7 +146,7 @@ public class AggregatingChartCreator implements ChartCreator { */ private void createTypes(Chart chart) { actionType = chart.createType("Action processing", new Color(0x000099)); - blazeType = chart.createType("Blaze internal processing", new Color(0x999999)); + blazeType = chart.createType("Bazel internal processing", new Color(0x999999)); lockType = chart.createType("Waiting for resources", new Color(0x990000)); if (showVFS) { vfsType = chart.createType("File system access", new Color(0x009900)); diff --git a/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java b/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java index c1261d057d..027f8e4eb6 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java +++ b/src/main/java/com/google/devtools/build/lib/query2/CommonQueryOptions.java @@ -82,15 +82,14 @@ public class CommonQueryOptions extends OptionsBase { public boolean includeHostDeps; @Option( - name = "implicit_deps", - defaultValue = "true", - documentationCategory = OptionDocumentationCategory.QUERY, - effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, - help = - "If enabled, implicit dependencies will be included in the dependency graph over " - + "which the query operates. An implicit dependency is one that is not explicitly " - + "specified in the BUILD file but added by blaze." - ) + name = "implicit_deps", + defaultValue = "true", + documentationCategory = OptionDocumentationCategory.QUERY, + effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, + help = + "If enabled, implicit dependencies will be included in the dependency graph over " + + "which the query operates. An implicit dependency is one that is not explicitly " + + "specified in the BUILD file but added by bazel.") public boolean includeImplicitDeps; /** Return the current options as a set of QueryEnvironment settings. */ @@ -168,21 +167,20 @@ public class CommonQueryOptions extends OptionsBase { } @Option( - name = "aspect_deps", - converter = AspectResolutionModeConverter.class, - defaultValue = "conservative", - documentationCategory = OptionDocumentationCategory.QUERY, - effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, - help = - "How to resolve aspect dependencies when the output format is one of {xml,proto,record}. " - + "'off' means no aspect dependencies are resolved, 'conservative' (the default) means " - + "all declared aspect dependencies are added regardless of whether they are viable " - + "given the rule class of direct dependencies, 'precise' means that only those " - + "aspects are added that are possibly active given the rule class of the direct " - + "dependencies. Note that precise mode requires loading other packages to evaluate " - + "a single target thus making it slower than the other modes. Also note that even " - + "precise mode is not completely precise: the decision whether to compute an aspect " - + "is decided in the analysis phase, which is not run during 'blaze query'." - ) + name = "aspect_deps", + converter = AspectResolutionModeConverter.class, + defaultValue = "conservative", + documentationCategory = OptionDocumentationCategory.QUERY, + effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS}, + help = + "How to resolve aspect dependencies when the output format is one of {xml,proto,record}. " + + "'off' means no aspect dependencies are resolved, 'conservative' (the default) " + + "means all declared aspect dependencies are added regardless of whether they are " + + "given the rule class of direct dependencies, 'precise' means that only those " + + "aspects are added that are possibly active given the rule class of the direct " + + "dependencies. Note that precise mode requires loading other packages to evaluate " + + "a single target thus making it slower than the other modes. Also note that even " + + "precise mode is not completely precise: the decision whether to compute an aspect " + + "is decided in the analysis phase, which is not run during 'bazel query'.") public AspectResolver.Mode aspectDeps; } diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java index 64f2bc88d2..734f96e0c2 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java @@ -360,21 +360,20 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment public Label androidLibcTopLabel; @Option( - name = "android_dynamic_mode", - defaultValue = "off", - converter = DynamicModeConverter.class, - documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = { - OptionEffectTag.AFFECTS_OUTPUTS, - OptionEffectTag.LOADING_AND_ANALYSIS, - }, - help = - "Determines whether C++ deps of Android rules will be linked dynamically when a " - + "cc_binary does not explicitly create a shared library. " - + "'default' means blaze will choose whether to link dynamically. " - + "'fully' means all libraries will be linked dynamically. " - + "'off' means that all libraries will be linked in mostly static mode." - ) + name = "android_dynamic_mode", + defaultValue = "off", + converter = DynamicModeConverter.class, + documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, + effectTags = { + OptionEffectTag.AFFECTS_OUTPUTS, + OptionEffectTag.LOADING_AND_ANALYSIS, + }, + help = + "Determines whether C++ deps of Android rules will be linked dynamically when a " + + "cc_binary does not explicitly create a shared library. " + + "'default' means bazel will choose whether to link dynamically. " + + "'fully' means all libraries will be linked dynamically. " + + "'off' means that all libraries will be linked in mostly static mode.") public DynamicMode dynamicMode; // Label of filegroup combining all Android tools used as implicit dependencies of diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java index 666840bda0..05356e5e15 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java @@ -181,11 +181,11 @@ public final class AndroidDeviceRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = android_device, TYPE = OTHER, FAMILY = Android) --> <p>This rule creates an android emulator configured with the given - specifications. This emulator may be started via a blaze run + specifications. This emulator may be started via a bazel run command or by executing the generated script directly. It is encouraged to depend on existing android_device rules rather than defining your own. </p> -<p>This rule is a suitable target for the --run_under flag to blaze test and blaze +<p>This rule is a suitable target for the --run_under flag to bazel test and blaze run. It starts an emulator, copies the target being tested/run to the emulator, and tests it or runs it as appropriate. </p> @@ -229,7 +229,7 @@ ro.product.name=soju </pre> <p> This rule will generate images and a start script. You can start the emulator - locally by executing blaze run :nexus_s -- --action=start. The script exposes + locally by executing bazel run :nexus_s -- --action=start. The script exposes the following flags: </p> <ul> diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java b/src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java index d63f5936c8..400bb2384e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java @@ -95,7 +95,7 @@ public final class DexArchiveAspect extends NativeAspectClass implements Configu /** * Function that limits this aspect to Java 8 desugaring (disabling incremental dexing) when * attaching this aspect to a target. This is intended for implicit attributes like the stub APKs - * for {@code blaze mobile-install}. + * for {@code bazel mobile-install}. */ @AutoCodec static final Function<Rule, AspectParameters> ONLY_DESUGAR_JAVA8 = diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java b/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java index b056d08f77..d10b320063 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/WriteAdbArgsAction.java @@ -35,7 +35,7 @@ import java.util.List; /** * An action that writes the a parameter file to {@code incremental_install.py} based on the command - * line arguments to {@code blaze mobile-install}. + * line arguments to {@code bazel mobile-install}. */ @Immutable // note that it accesses data non-hermetically during the execution phase public final class WriteAdbArgsAction extends AbstractFileWriteAction { diff --git a/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java index bf0256ab92..8c5966bab4 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/config/ConfigRuleClasses.java @@ -139,21 +139,21 @@ public class ConfigRuleClasses { public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) { return builder /* <!-- #BLAZE_RULE(config_setting).ATTRIBUTE(values) --> - The set of configuration values that match this rule (expressed as Blaze flags) + The set of configuration values that match this rule (expressed as Bazel flags) <i>(Dictionary mapping flags to expected values, both expressed as strings; mandatory)</i> <p>This rule inherits the configuration of the configured target that references it in a <code>select</code> statement. It is considered to - "match" a Blaze invocation if, for every entry in the dictionary, its + "match" a Bazel invocation if, for every entry in the dictionary, its configuration matches the entry's expected value. For example <code>values = {"compilation_mode": "opt"}</code> matches the invocations - <code>blaze build --compilation_mode=opt ...</code> and - <code>blaze build -c opt ...</code> on target-configured rules. + <code>bazel build --compilation_mode=opt ...</code> and + <code>bazel build -c opt ...</code> on target-configured rules. </p> - <p>For convenience's sake, configuration values are specified as Blaze flags (without + <p>For convenience's sake, configuration values are specified as Bazel flags (without the preceding <code>"--"</code>). But keep in mind that the two are not the same. This is because targets can be built in multiple configurations within the same build. For example, a host configuration's "cpu" matches the value of @@ -165,7 +165,7 @@ public class ConfigRuleClasses { <p>If a flag is not explicitly set at the command line, its default value is used. If a key appears multiple times in the dictionary, only the last instance is used. If a key references a flag that can be set multiple times on the command line (e.g. - <code>blaze build --copt=foo --copt=bar --copt=baz ...</code>), a match occurs if + <code>bazel build --copt=foo --copt=bar --copt=baz ...</code>), a match occurs if <i>any</i> of those settings match. <p> @@ -183,10 +183,10 @@ public class ConfigRuleClasses { <p><code>--define</code> is special for two reasons: <ol> - <li>It's the primary interface Blaze has today for declaring user-definable settings. + <li>It's the primary interface Bazel has today for declaring user-definable settings. </li> <li>Its syntax (<code>--define KEY=VAL</code>) means <code>KEY=VAL</code> is - a <i>value</i> from a Blaze flag perspective.</li> + a <i>value</i> from a Bazel flag perspective.</li> </ol> <p>That means: @@ -212,7 +212,7 @@ public class ConfigRuleClasses { }) </pre> - <p>corrrectly matches <code>blaze build //foo --define a=1 --define b=2</code>. + <p>corrrectly matches <code>bazel build //foo --define a=1 --define b=2</code>. <p><code>--define</code> can still appear in <a href="${link config_setting.values}"><code>values</code></a> with normal flag syntax, @@ -248,12 +248,12 @@ public class ConfigRuleClasses { <p>As mentioned above, this rule inherits the configuration of the configured target that references it in a <code>select</code> statement. This <code>constraint_values</code> - attribute is considered to "match" a Blaze invocation if it includes each + attribute is considered to "match" a Bazel invocation if it includes each <code>constraint_value</code> specified in the configuration's target platform which is set with the command line flag <code>--experimental_platforms</code>. If it contains extra <code>constraint_values</code> not included in the target platform, it is still considered a match. In this example, both <code>slate</code> and - <code>marble</code> would be considered matches for a blaze invocation which + <code>marble</code> would be considered matches for a bazel invocation which uses <code>--experimental_platforms=my_platform_rocks</code>. Multiple matches like this may lead to ambiguous select resolves and are not allowed. </p> @@ -302,97 +302,97 @@ public class ConfigRuleClasses { .build(); } } -/*<!-- #BLAZE_RULE (NAME = config_setting, TYPE = OTHER, FAMILY = General)[GENERIC_RULE] --> - -<p> - Matches an expected configuration state (expressed as Blaze flags) for the purpose of triggering - configurable attributes. See <a href="${link select}">select</a> for how to consume this - rule and <a href="${link common-definitions#configurable-attributes}"> - Configurable attributes</a> for an overview of the general feature. - -<h4 id="config_setting_examples">Examples</h4> - -<p>The following matches any Blaze invocation that specifies <code>--compilation_mode=opt</code> - or <code>-c opt</code> (either explicitly at the command line or implicitly from .blazerc - files, etc.), when applied to a target configuration rule: -</p> - -<pre class="code"> -config_setting( - name = "simple", - values = {"compilation_mode": "opt"} -) -</pre> - -<p>The following matches any Blaze invocation that builds for ARM and applies a custom define - (e.g. <code>blaze build --cpu=armeabi --define FOO=bar ...</code>), when applied to a target - configuration rule: -</p> - -<pre class="code"> -config_setting( - name = "two_conditions", - values = { - "cpu": "armeabi", - "define": "FOO=bar" - } -) -</pre> - -<p>The following config_setting matches any Blaze invocation that builds a platform which contains - exactly the same or a subset of its constraint_values (like the example below). -</p> - -<pre class=""code"> -config_setting( - name = "marble", - constraint_values = [ - "white", - "metamorphic", - ] -) - -platform( - name = "marble_platform", - constraint_values = [ - "white", - "metamorphic" - ] -) -</pre> - -<h4 id="config_setting_notes">Notes</h4> - -<p>See <a href="${link select}">select</a> for policies on what happens depending on how - many rules match an invocation. -</p> - -<p>For flags that support shorthand forms (e.g. <code>--compilation_mode</code> vs. - <code>-c</code>), <code>values</code> definitions must use the full form. These automatically - match invocations using either form. -</p> - -<p>The currently endorsed method for creating custom conditions that can't be expressed through - dedicated build flags is through the --define flag. Use this flag with caution: it's not ideal - and only endorsed for lack of a currently better workaround. See the - <a href="${link common-definitions#configurable-attributes}"> - Configurable attributes</a> section for more discussion. -</p> - -<p>Try to consolidate <code>config_setting</code> definitions as much as possible. In other words, - define <code>//common/conditions:foo</code> in one common package instead of repeating separate - instances in <code>//project1:foo</code>, <code>//project2:foo</code>, etc. that all mean the - same thing. -</p> - -<p><a href="general.html#config_setting.values"><code>values</code></a>, - <a href="general.html#config_setting.define_values"><code>define_values</code></a>, and - <a href=general.html#config_setting.constraint_values"><code>constraint_values</code></a> - can be used in any combination in the same config_setting but at least one must be set for any - given config_setting. -</p> - -<!-- #END_BLAZE_RULE -->*/ + /*<!-- #BLAZE_RULE (NAME = config_setting, TYPE = OTHER, FAMILY = General)[GENERIC_RULE] --> + + <p> + Matches an expected configuration state (expressed as Bazel flags) for the purpose of triggering + configurable attributes. See <a href="${link select}">select</a> for how to consume this + rule and <a href="${link common-definitions#configurable-attributes}"> + Configurable attributes</a> for an overview of the general feature. + + <h4 id="config_setting_examples">Examples</h4> + + <p>The following matches any Bazel invocation that specifies <code>--compilation_mode=opt</code> + or <code>-c opt</code> (either explicitly at the command line or implicitly from .blazerc + files, etc.), when applied to a target configuration rule: + </p> + + <pre class="code"> + config_setting( + name = "simple", + values = {"compilation_mode": "opt"} + ) + </pre> + + <p>The following matches any Bazel invocation that builds for ARM and applies a custom define + (e.g. <code>bazel build --cpu=armeabi --define FOO=bar ...</code>), when applied to a target + configuration rule: + </p> + + <pre class="code"> + config_setting( + name = "two_conditions", + values = { + "cpu": "armeabi", + "define": "FOO=bar" + } + ) + </pre> + + <p>The following config_setting matches any Bazel invocation that builds a platform which contains + exactly the same or a subset of its constraint_values (like the example below). + </p> + + <pre class=""code"> + config_setting( + name = "marble", + constraint_values = [ + "white", + "metamorphic", + ] + ) + + platform( + name = "marble_platform", + constraint_values = [ + "white", + "metamorphic" + ] + ) + </pre> + + <h4 id="config_setting_notes">Notes</h4> + + <p>See <a href="${link select}">select</a> for policies on what happens depending on how + many rules match an invocation. + </p> + + <p>For flags that support shorthand forms (e.g. <code>--compilation_mode</code> vs. + <code>-c</code>), <code>values</code> definitions must use the full form. These automatically + match invocations using either form. + </p> + + <p>The currently endorsed method for creating custom conditions that can't be expressed through + dedicated build flags is through the --define flag. Use this flag with caution: it's not ideal + and only endorsed for lack of a currently better workaround. See the + <a href="${link common-definitions#configurable-attributes}"> + Configurable attributes</a> section for more discussion. + </p> + + <p>Try to consolidate <code>config_setting</code> definitions as much as possible. In other words, + define <code>//common/conditions:foo</code> in one common package instead of repeating separate + instances in <code>//project1:foo</code>, <code>//project2:foo</code>, etc. that all mean the + same thing. + </p> + + <p><a href="general.html#config_setting.values"><code>values</code></a>, + <a href="general.html#config_setting.define_values"><code>define_values</code></a>, and + <a href=general.html#config_setting.constraint_values"><code>constraint_values</code></a> + can be used in any combination in the same config_setting but at least one must be set for any + given config_setting. + </p> + + <!-- #END_BLAZE_RULE -->*/ /** Rule definition for Android's config_feature_flag rule. */ public static final class ConfigFeatureFlagRule implements RuleDefinition { diff --git a/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListener.java b/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListener.java index afbb2da522..7ea7f35759 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListener.java +++ b/src/main/java/com/google/devtools/build/lib/rules/extra/ActionListener.java @@ -80,8 +80,8 @@ public final class ActionListener implements RuleConfiguredTargetFactory { } } if (extraActions.isEmpty()) { - ruleContext.attributeWarning("extra_actions", - "No extra_action is specified for this version of blaze."); + ruleContext.attributeWarning( + "extra_actions", "No extra_action is specified for this version of bazel."); } return extraActions; } diff --git a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQueryRule.java b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQueryRule.java index bdb49047ac..f32016b245 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQueryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQueryRule.java @@ -39,7 +39,7 @@ public final class GenQueryRule implements RuleDefinition { .add(attr("scope", LABEL_LIST).mandatory().legacyAllowAnyFileType()) /* <!-- #BLAZE_RULE(genquery).ATTRIBUTE(strict) --> If true, targets whose queries escape the transitive closure of their scopes will fail to - build. If false, Blaze will print a warning and skip whatever query path led it outside of + build. If false, Bazel will print a warning and skip whatever query path led it outside of the scope, while completing the rest of the query. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("strict", BOOLEAN).value(true)) @@ -52,10 +52,10 @@ public final class GenQueryRule implements RuleDefinition { .add(attr("expression", STRING).mandatory()) /* <!-- #BLAZE_RULE(genquery).ATTRIBUTE(opts) --> The options that are passed to the query engine. These correspond to the command line - options that can be passed to <code>blaze query</code>. Some query options are not allowed + options that can be passed to <code>bazel query</code>. Some query options are not allowed here: <code>--keep_going</code>, <code>--query_file</code>, <code>--universe_scope</code>, <code>--order_results</code> and <code>--order_output</code>. Options not specified here - will have their default values just like on the command line of <code>blaze query</code>. + will have their default values just like on the command line of <code>bazel query</code>. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("opts", STRING_LIST)) .build(); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index 7fe734a4c3..c17fa06926 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -1045,7 +1045,7 @@ public class ObjcRuleClasses { /* <!-- #BLAZE_RULE($objc_bundling_rule).ATTRIBUTE(infoplist)[DEPRECATED] --> The infoplist file. This corresponds to <i>appname</i>-Info.plist in Xcode projects. - <p>Blaze will perform variable substitution on the plist file for the following values + <p>Bazel will perform variable substitution on the plist file for the following values (if they are strings in the top-level <code>dict</code> of the plist):</p> <ul> @@ -1058,7 +1058,7 @@ public class ObjcRuleClasses { </ul> <p>The key in <code>${}</code> may be suffixed with <code>:rfc1034identifier</code> (for - example <code>${PRODUCT_NAME::rfc1034identifier}</code>) in which case Blaze will + example <code>${PRODUCT_NAME::rfc1034identifier}</code>) in which case Bazel will replicate Xcode's behavior and replace non-RFC1034-compliant characters with <code>-</code>.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ @@ -1069,7 +1069,7 @@ public class ObjcRuleClasses { and only if the values conflict. If both <code>infoplist</code> and <code>infoplists</code> are specified, the files defined in both attributes will be used. - <p>Blaze will perform variable substitution on the plist file for the following values + <p>Bazel will perform variable substitution on the plist file for the following values (if they are strings in the top-level <code>dict</code> of the plist):</p> <ul> @@ -1082,7 +1082,7 @@ public class ObjcRuleClasses { </ul> <p>The key in <code>${}</code> may be suffixed with <code>:rfc1034identifier</code> (for - example <code>${PRODUCT_NAME::rfc1034identifier}</code>) in which case Blaze will + example <code>${PRODUCT_NAME::rfc1034identifier}</code>) in which case Bazel will replicate Xcode's behavior and replace non-RFC1034-compliant characters with <code>-</code>.</p> <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java index 7fcbbcd95a..bceb04c833 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandEventHandler.java @@ -156,14 +156,13 @@ public class BlazeCommandEventHandler implements EventHandler { public boolean showTimestamp; @Option( - name = "progress_in_terminal_title", - defaultValue = "false", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "Show the command progress in the terminal title. " - + "Useful to see what blaze is doing when having multiple terminal tabs." - ) + name = "progress_in_terminal_title", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "Show the command progress in the terminal title. " + + "Useful to see what bazel is doing when having multiple terminal tabs.") public boolean progressInTermTitle; @Option( 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 f073fda405..5a1708225d 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 @@ -228,8 +228,8 @@ public final class BlazeRuntime { for (BlazeModule module : blazeModules) { CoverageReportActionFactory factory = module.getCoverageReportFactory(commandOptions); if (factory != null) { - Preconditions.checkState(firstFactory == null, - "only one Blaze Module can have a Coverage Report Factory"); + Preconditions.checkState( + firstFactory == null, "only one Bazel Module can have a Coverage Report Factory"); firstFactory = factory; } } @@ -393,12 +393,12 @@ public final class BlazeRuntime { options = optionsFromModule; } else { throw new IllegalArgumentException( - "Two or more blaze modules contained default build options."); + "Two or more bazel modules contained default build options."); } } } if (options == null) { - throw new IllegalArgumentException("No default build options specified in any Blaze module"); + throw new IllegalArgumentException("No default build options specified in any Bazel module"); } return options; } @@ -636,10 +636,7 @@ public final class BlazeRuntime { System.exit(batchMain(modules, args)); } logger.info( - "Starting Blaze server with " - + maybeGetPidString() - + "args " - + Arrays.toString(args)); + "Starting Bazel server with " + maybeGetPidString() + "args " + Arrays.toString(args)); try { // Run Blaze in server mode. System.exit(serverMain(modules, OutErr.SYSTEM_OUT_ERR, args)); @@ -782,7 +779,7 @@ public final class BlazeRuntime { @Override public void run() { logger.info("User interrupt"); - OutErr.SYSTEM_OUT_ERR.printErrLn("Blaze received an interrupt"); + OutErr.SYSTEM_OUT_ERR.printErrLn("Bazel received an interrupt"); mainThread.interrupt(); int curNumInterrupts = numInterrupts.incrementAndGet(); @@ -806,7 +803,7 @@ public final class BlazeRuntime { InterruptSignalHandler signalHandler = captureSigint(); CommandLineOptions commandLineOptions = splitStartupOptions(modules, args); logger.info( - "Running Blaze in batch mode with " + "Running Bazel in batch mode with " + maybeGetPidString() + "startup args " + commandLineOptions.getStartupArgs()); 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 faed25a203..8fdd14082d 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 @@ -112,23 +112,22 @@ public class BlazeServerStartupOptions extends OptionsBase { * necessary. */ @Option( - name = "output_base", - defaultValue = "null", // NOTE: only for documentation, value is always passed by the client. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOSES_INCREMENTAL_STATE}, - converter = OptionsUtils.PathFragmentConverter.class, - valueHelp = "<path>", - help = - "If set, specifies the output location to which all build output will be written. " - + "Otherwise, the location will be " - + "${OUTPUT_ROOT}/_blaze_${USER}/${MD5_OF_WORKSPACE_ROOT}. Note: If you specify a " - + "different option from one to the next Blaze invocation for this value, you'll " - + "likely start up a new, additional Blaze server. Blaze starts exactly one server per " - + "specified output base. Typically there is one output base per workspace - however, " - + "with this option you may have multiple output bases per workspace and thereby run " - + "multiple builds for the same client on the same machine concurrently. See " - + "'blaze help shutdown' on how to shutdown a Blaze server." - ) + name = "output_base", + defaultValue = "null", // NOTE: only for documentation, value is always passed by the client. + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.LOSES_INCREMENTAL_STATE}, + converter = OptionsUtils.PathFragmentConverter.class, + valueHelp = "<path>", + help = + "If set, specifies the output location to which all build output will be written. " + + "Otherwise, the location will be " + + "${OUTPUT_ROOT}/_blaze_${USER}/${MD5_OF_WORKSPACE_ROOT}. Note: If you specify a " + + "different option from one to the next Bazel invocation for this value, you'll " + + "likely start up a new, additional Bazel server. Bazel starts exactly one server " + + "per specified output base. Typically there is one output base per workspace - " + + "however, with this option you may have multiple output bases per workspace and " + + "thereby run multiple builds for the same client on the same machine concurrently. " + + "See 'bazel help shutdown' on how to shutdown a Bazel server.") public PathFragment outputBase; @Option( @@ -164,16 +163,15 @@ public class BlazeServerStartupOptions extends OptionsBase { public PathFragment serverJvmOut; @Option( - name = "workspace_directory", - defaultValue = "", // NOTE: only for documentation, value is always passed by the client. - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.LOSES_INCREMENTAL_STATE}, - metadataTags = {OptionMetadataTag.HIDDEN}, - converter = OptionsUtils.PathFragmentConverter.class, - help = - "The root of the workspace, that is, the directory that Blaze uses as the root of the " - + "build. This flag is only to be set by the blaze client." - ) + name = "workspace_directory", + defaultValue = "", // NOTE: only for documentation, value is always passed by the client. + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.CHANGES_INPUTS, OptionEffectTag.LOSES_INCREMENTAL_STATE}, + metadataTags = {OptionMetadataTag.HIDDEN}, + converter = OptionsUtils.PathFragmentConverter.class, + help = + "The root of the workspace, that is, the directory that Bazel uses as the root of the " + + "build. This flag is only to be set by the bazel client.") public PathFragment workspaceDirectory; @Option( @@ -203,19 +201,19 @@ public class BlazeServerStartupOptions extends OptionsBase { public int maxIdleSeconds; @Option( - name = "batch", - defaultValue = "false", - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = { - OptionEffectTag.LOSES_INCREMENTAL_STATE, - OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION - }, - metadataTags = {OptionMetadataTag.DEPRECATED}, - help = - "If set, Blaze will be run as just a client process without a server, instead of in " - + "the standard client/server mode. This is deprecated and will be removed, please " - + "prefer shutting down the server explicitly if you wish to avoid lingering servers." - ) + name = "batch", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = { + OptionEffectTag.LOSES_INCREMENTAL_STATE, + OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION + }, + metadataTags = {OptionMetadataTag.DEPRECATED}, + help = + "If set, Bazel will be run as just a client process without a server, instead of in " + + "the standard client/server mode. This is deprecated and will be removed, please " + + "prefer shutting down the server explicitly if you wish to avoid lingering " + + "servers.") public boolean batch; @Option( @@ -243,52 +241,49 @@ public class BlazeServerStartupOptions extends OptionsBase { public boolean oomMoreEagerly; @Option( - name = "experimental_oom_more_eagerly_threshold", - defaultValue = "100", // NOTE: only for documentation, value is always passed by the client. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.EAGERNESS_TO_EXIT}, - help = - "If this flag is set, Blaze will OOM if, after two full GC's, more than this percentage of " - + "the (old gen) heap is still occupied. Deprecated: Use the command argument " - + "--experimental_oom_more_eagerly_threshold instead." - ) + name = "experimental_oom_more_eagerly_threshold", + defaultValue = "100", // NOTE: only for documentation, value is always passed by the client. + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.EAGERNESS_TO_EXIT}, + help = + "If this flag is set, Bazel will OOM if, after two full GC's, more than this percentage " + + "of the (old gen) heap is still occupied. Deprecated: Use the command argument " + + "--experimental_oom_more_eagerly_threshold instead.") public int oomMoreEagerlyThreshold; @Option( - name = "block_for_lock", - defaultValue = "true", // NOTE: only for documentation, value never passed to the server. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.EAGERNESS_TO_EXIT}, - help = - "When --noblock_for_lock is passed, Blaze does not wait for a running command to " - + "complete, but instead exits immediately." - ) + name = "block_for_lock", + defaultValue = "true", // NOTE: only for documentation, value never passed to the server. + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = {OptionEffectTag.EAGERNESS_TO_EXIT}, + help = + "When --noblock_for_lock is passed, Bazel does not wait for a running command to " + + "complete, but instead exits immediately.") public boolean blockForLock; @Option( - name = "io_nice_level", - defaultValue = "-1", // NOTE: only for documentation, value never passed to the server. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, - valueHelp = "{-1,0,1,2,3,4,5,6,7}", - help = - "Only on Linux; set a level from 0-7 for best-effort IO scheduling using the " - + "sys_ioprio_set system call. 0 is highest priority, 7 is lowest. The anticipatory " - + "scheduler may only honor up to priority 4. If set to a negative value, then Blaze " - + "does not perform a system call." - ) + name = "io_nice_level", + defaultValue = "-1", // NOTE: only for documentation, value never passed to the server. + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, + valueHelp = "{-1,0,1,2,3,4,5,6,7}", + help = + "Only on Linux; set a level from 0-7 for best-effort IO scheduling using the " + + "sys_ioprio_set system call. 0 is highest priority, 7 is lowest. The anticipatory " + + "scheduler may only honor up to priority 4. If set to a negative value, then Bazel " + + "does not perform a system call.") public int ioNiceLevel; @Option( - name = "batch_cpu_scheduling", - defaultValue = "false", // NOTE: only for documentation, value never passed to the server. - documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, - effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, - help = - "Only on Linux; use 'batch' CPU scheduling for Blaze. This policy is useful for " - + "workloads that are non-interactive, but do not want to lower their nice value. " - + "See 'man 2 sched_setscheduler'. If false, then Blaze does not perform a system call." - ) + name = "batch_cpu_scheduling", + defaultValue = "false", // NOTE: only for documentation, value never passed to the server. + documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS, + effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, + help = + "Only on Linux; use 'batch' CPU scheduling for Blaze. This policy is useful for " + + "workloads that are non-interactive, but do not want to lower their nice value. " + + "See 'man 2 sched_setscheduler'. If false, then Bazel does not perform a system " + + "call.") public boolean batchCpuScheduling; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java index 78760d9562..608bb968c1 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java @@ -281,13 +281,13 @@ public final class BlazeWorkspace { "reverse engineer the set of source trees or the --package_path from the output", "tree, and if you attempt it, you will fail, creating subtle and", "hard-to-diagnose bugs, that will no doubt get blamed on changes made by the", - "Blaze team.", + "Bazel team.", "", - "This directory was generated by Blaze.", + "This directory was generated by Bazel.", "Do not attempt to modify or delete any files in this directory.", - "Among other issues, Blaze's file system caching assumes that", - "only Blaze will modify this directory and the files in it,", - "so if you change anything here you may mess up Blaze's cache."); + "Among other issues, Bazel's file system caching assumes that", + "only Bazel will modify this directory and the files in it,", + "so if you change anything here you may mess up Bazel's cache."); } catch (IOException e) { logger.warning("Couldn't write to '" + outputBaseReadmeFile + "': " + e.getMessage()); } diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java index 2a88c32e98..b398aff727 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java @@ -196,28 +196,26 @@ public class CommonCommandOptions extends OptionsBase { public boolean enableTracer; @Option( - name = "profile", - defaultValue = "null", - documentationCategory = OptionDocumentationCategory.LOGGING, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - converter = OptionsUtils.PathFragmentConverter.class, - help = - "If set, profile Blaze and write data to the specified " - + "file. Use blaze analyze-profile to analyze the profile." - ) + name = "profile", + defaultValue = "null", + documentationCategory = OptionDocumentationCategory.LOGGING, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + converter = OptionsUtils.PathFragmentConverter.class, + help = + "If set, profile Bazel and write data to the specified " + + "file. Use bazel analyze-profile to analyze the profile.") public PathFragment profilePath; @Option( - name = "record_full_profiler_data", - defaultValue = "false", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - help = - "By default, Blaze profiler will record only aggregated data for fast but numerous " - + "events (such as statting the file). If this option is enabled, profiler will record " - + "each event - resulting in more precise profiling data but LARGE performance " - + "hit. Option only has effect if --profile used as well." - ) + name = "record_full_profiler_data", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + help = + "By default, Bazel profiler will record only aggregated data for fast but numerous " + + "events (such as statting the file). If this option is enabled, profiler will " + + "record each event - resulting in more precise profiling data but LARGE " + + "performance hit. Option only has effect if --profile used as well.") public boolean recordFullProfilerData; @Option( @@ -246,53 +244,48 @@ public class CommonCommandOptions extends OptionsBase { public MemoryProfileStableHeapParameters memoryProfileStableHeapParameters; @Option( - name = "experimental_oom_more_eagerly_threshold", - defaultValue = "100", - documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY, - effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, - help = - "If this flag is set to a value less than 100, Blaze will OOM if, after two full GC's, more" - + "than this percentage of the (old gen) heap is still occupied." - ) + name = "experimental_oom_more_eagerly_threshold", + defaultValue = "100", + documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY, + effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, + help = + "If this flag is set to a value less than 100, Bazel will OOM if, after two full GC's, " + + "more than this percentage of the (old gen) heap is still occupied.") public int oomMoreEagerlyThreshold; @Option( - name = "startup_time", - defaultValue = "0", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - metadataTags = {OptionMetadataTag.HIDDEN}, - help = "The time in ms the launcher spends before sending the request to the blaze server." - ) + name = "startup_time", + defaultValue = "0", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + metadataTags = {OptionMetadataTag.HIDDEN}, + help = "The time in ms the launcher spends before sending the request to the bazel server.") public long startupTime; @Option( - name = "extract_data_time", - defaultValue = "0", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - metadataTags = {OptionMetadataTag.HIDDEN}, - help = "The time in ms spent on extracting the new blaze version." - ) + name = "extract_data_time", + defaultValue = "0", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + metadataTags = {OptionMetadataTag.HIDDEN}, + help = "The time in ms spent on extracting the new bazel version.") public long extractDataTime; @Option( - name = "command_wait_time", - defaultValue = "0", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - metadataTags = {OptionMetadataTag.HIDDEN}, - help = "The time in ms a command had to wait on a busy Blaze server process." - ) + name = "command_wait_time", + defaultValue = "0", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + metadataTags = {OptionMetadataTag.HIDDEN}, + help = "The time in ms a command had to wait on a busy Bazel server process.") public long waitTime; @Option( - name = "tool_tag", - defaultValue = "", - documentationCategory = OptionDocumentationCategory.LOGGING, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - help = "A tool name to attribute this Blaze invocation to." - ) + name = "tool_tag", + defaultValue = "", + documentationCategory = OptionDocumentationCategory.LOGGING, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + help = "A tool name to attribute this Bazel invocation to.") public String toolTag; @Option( @@ -306,13 +299,12 @@ public class CommonCommandOptions extends OptionsBase { public String restartReason; @Option( - name = "binary_path", - defaultValue = "", - documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, - effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, - metadataTags = {OptionMetadataTag.HIDDEN}, - help = "The absolute path of the blaze binary." - ) + name = "binary_path", + defaultValue = "", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + metadataTags = {OptionMetadataTag.HIDDEN}, + help = "The absolute path of the bazel binary.") public String binaryPath; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java index 7e02b253ee..28e07bb0ff 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/HostJvmStartupOptions.java @@ -30,13 +30,12 @@ import java.util.List; public class HostJvmStartupOptions extends OptionsBase { @Option( - name = "host_javabase", - defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions. - valueHelp = "<jvm path>", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = "Path to the JVM used to execute Blaze itself." - ) + name = "host_javabase", + defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions. + valueHelp = "<jvm path>", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = "Path to the JVM used to execute Bazel itself.") public String hostJavabase; @Option( @@ -51,16 +50,15 @@ public class HostJvmStartupOptions extends OptionsBase { public List<String> hostJvmArgs; @Option( - name = "host_jvm_profile", - defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions. - valueHelp = "<profiler_name>", - documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, - effectTags = {OptionEffectTag.UNKNOWN}, - help = - "Convenience option to add some profiler/debugger-specific JVM startup flags. " - + "Blaze has a list of known values that it maps to hard-coded JVM startup flags, " - + "possibly searching some hardcoded paths for certain files." - ) + name = "host_jvm_profile", + defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions. + valueHelp = "<profiler_name>", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + help = + "Convenience option to add some profiler/debugger-specific JVM startup flags. " + + "Bazel has a list of known values that it maps to hard-coded JVM startup flags, " + + "possibly searching some hardcoded paths for certain files.") public String hostJvmProfile; @Option( diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java index cadda32a2d..a396c8013f 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java @@ -347,7 +347,7 @@ public class DumpCommand implements BlazeCommand { PrintStream out) { List<RuleStat> ruleStats = executor.getRuleStats(eventHandler); if (ruleStats.isEmpty()) { - out.print("No rules in Blaze server, please run a build command first."); + out.print("No rules in Bazel server, please run a build command first."); return; } List<RuleStat> rules = ruleStats.stream().filter(RuleStat::isRule).collect(toList()); diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java index 6756788755..971bd90442 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/ProfileCommand.java @@ -222,9 +222,12 @@ public final class ProfileCommand implements BlazeCommand { } try (PrintStream out = new PrintStream(env.getReporter().getOutErr().getOutputStream())) { - env.getReporter().handle(Event.warn( - null, "This information is intended for consumption by Blaze developers" - + " only, and may change at any time. Script against it at your own risk")); + env.getReporter() + .handle( + Event.warn( + null, + "This information is intended for consumption by Bazel developers" + + " only, and may change at any time. Script against it at your own risk")); if (opts.combine != null && opts.dumpMode == null) { MultiProfileStatistics statistics = new MultiProfileStatistics( diff --git a/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java b/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java index fb3cbc932b..2d02631e40 100644 --- a/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java +++ b/src/main/java/com/google/devtools/build/lib/server/GrpcServerImpl.java @@ -775,7 +775,7 @@ public class GrpcServerImpl implements RPCServer { */ StringWriter err = new StringWriter(); PrintWriter printErr = new PrintWriter(err); - printErr.println("=======[BLAZE SERVER: ENCOUNTERED IO EXCEPTION]======="); + printErr.println("=======[BAZEL SERVER: ENCOUNTERED IO EXCEPTION]======="); e.printStackTrace(printErr); printErr.println("====================================================="); logger.severe(err.toString()); |