66# beginning of each Bazel invocation. This is very useful on CI to be able to inspect which flags
77# are being applied on each run based on the order of overrides.
88common:ci --announce_rc
9- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=announce_rc
9+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=announce_rc
1010
1111# Avoid creating a runfiles tree for binaries or tests until it is needed.
1212# See https://github.com/bazelbuild/bazel/issues/6627
1313# This may break local workflows that `build` a binary target, then run the resulting program outside of `bazel run`.
1414# In those cases, the script will need to call `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program.
1515common --nobuild_runfile_links
16- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=build_runfile_links
16+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=build_runfile_links
1717
1818# See https://github.com/bazelbuild/bazel/issues/20577
1919coverage --build_runfile_links
20- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=build_runfile_links
20+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=build_runfile_links
2121
2222# Always run tests even if they have cached results.
2323# This ensures tests are executed fresh each time, useful for debugging and ensuring test reliability.
2424common:debug --nocache_test_results
25- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=cache_test_results
25+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=cache_test_results
2626
2727# Don’t encourage a rules author to update their deps if not needed.
2828# These bazel_dep calls should indicate the minimum version constraint of the ruleset.
@@ -31,49 +31,49 @@ common:debug --nocache_test_results
3131# Context:
3232# https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0
3333common:ruleset --check_direct_dependencies="off"
34- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=check_direct_dependencies
34+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=check_direct_dependencies
3535
3636# On CI, use colors to highlight output on the screen. Set to `no` if your CI does not display colors.
3737common:ci --color="yes"
38- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=color
38+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=color
3939
4040# On CI, use cursor controls in screen output.
4141common:ci --curses="yes"
42- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=curses
42+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=curses
4343
4444# Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is
4545# Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS
4646# identifiers are `linux`, `macos`, `windows`, `freebsd`, and `openbsd`. Enabling this flag is
4747# equivalent to using `--config=linux` on Linux, `--config=windows` on Windows, etc.
4848common --enable_platform_specific_config
49- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=enable_platform_specific_config
49+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=enable_platform_specific_config
5050
5151# Speed up all builds by not checking if external repository files have been modified.
5252# For reference: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244
5353common --noexperimental_check_external_repository_files
54- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=experimental_check_external_repository_files
54+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=experimental_check_external_repository_files
5555
5656# Always download coverage files for tests from the remote cache. By default, coverage files are not
5757# downloaded on test result cache hits when --remote_download_minimal is enabled, making it impossible
5858# to generate a full coverage report.
5959common --experimental_fetch_all_coverage_outputs
60- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=experimental_fetch_all_coverage_outputs
60+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=experimental_fetch_all_coverage_outputs
6161
6262# This flag was added in Bazel 6.2.0 with a default of zero:
6363# https://github.com/bazelbuild/bazel/commit/24b45890c431de98d586fdfe5777031612049135
6464# For Bazel 8.0.0rc1 the default was changed to 5:
6565# https://github.com/bazelbuild/bazel/commit/739e37de66f4913bec1a55b2f2a162e7db6f2d0f
6666# Back-port the updated flag default value to older Bazel versions.
6767common --experimental_remote_cache_eviction_retries=5
68- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=experimental_remote_cache_eviction_retries
68+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=experimental_remote_cache_eviction_retries
6969
7070# This flag was added in Bazel 5.0.0 with a default of zero:
7171# https://github.com/bazelbuild/bazel/commit/a1137ec1338d9549fd34a9a74502ffa58c286a8e
7272# For Bazel 8.0.0 the default was changed to 5:
7373# https://github.com/bazelbuild/bazel/commit/9335cf989ee6a678ca10bc4da72214634cef0a57
7474# Back-port the updated flag default value to older Bazel versions.
7575common --experimental_repository_downloader_retries=5
76- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=experimental_repository_downloader_retries
76+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=experimental_repository_downloader_retries
7777
7878# Set this flag to enable re-tries of failed tests on CI.
7979# When any test target fails, try one or more times. This applies regardless of whether the "flaky"
@@ -88,52 +88,52 @@ common --experimental_repository_downloader_retries=5
8888#
8989# Note that when passing after the first attempt, Bazel will give a special "FLAKY" status rather than "PASSED".
9090test:ci --flaky_test_attempts=2
91- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=flaky_test_attempts
91+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=flaky_test_attempts
9292
9393# Fixes builds hanging on CI that get the TCP connection closed without sending RST packets.
9494common:ci --grpc_keepalive_time="30s"
95- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=grpc_keepalive_time
95+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=grpc_keepalive_time
9696
9797# Output a heap dump if an OOM is thrown during a Bazel invocation
9898# (including OOMs due to `--experimental_oom_more_eagerly_threshold`).
9999# The dump will be written to `<output_base>/<invocation_id>.heapdump.hprof`.
100100# You should configure CI to upload this artifact for later inspection.
101101common --heap_dump_on_oom
102- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=heap_dump_on_oom
102+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=heap_dump_on_oom
103103
104104# Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server
105105# notices when a directory changes, if you have a directory listed in the srcs of some target.
106106# Recommended when using [copy_directory](https://github.com/bazel-contrib/bazel-lib/blob/main/docs/copy_directory.md)
107107# and [rules_js](https://github.com/aspect-build/rules_js) since npm package are source directories inputs to copy_directory actions.
108108startup --host_jvm_args="-DBAZEL_TRACK_SOURCE_DIRECTORIES=1"
109- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=host_jvm_args
109+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=host_jvm_args
110110
111111# By default, Bazel automatically creates __init__.py files for py_binary and py_test targets.
112112# From https://github.com/bazelbuild/bazel/issues/10076:
113113# > It is magic at a distance.
114114# > Python programmers are already used to creating __init__.py files in their source trees,
115115# > so doing it behind their backs introduces confusion and changes the semantics of imports
116116common --incompatible_default_to_explicit_init_py
117- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=incompatible_default_to_explicit_init_py
117+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=incompatible_default_to_explicit_init_py
118118
119119# Disallow empty glob patterns.
120120# The glob() function tends to be error-prone, because any typo in a path will silently return an empty list.
121121# This flag was added in Bazel 0.27 and flipped in Bazel 8: https://github.com/bazelbuild/bazel/issues/8195
122122common --incompatible_disallow_empty_glob
123- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=incompatible_disallow_empty_glob
123+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=incompatible_disallow_empty_glob
124124
125125# Make builds more reproducible by using a static value for PATH and not inheriting LD_LIBRARY_PATH.
126126# Use `--action_env=ENV_VARIABLE` if you want to inherit specific variables from the environment where Bazel runs.
127127# Note that doing so can prevent cross-user caching if a shared cache is used.
128128# See https://github.com/bazelbuild/bazel/issues/2574 for more details.
129129common --incompatible_strict_action_env
130- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=incompatible_strict_action_env
130+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=incompatible_strict_action_env
131131
132132# Performance improvement: avoid laying out a second copy of the runfiles tree.
133133# See https://github.com/bazelbuild/bazel/issues/23574.
134134# This flag was flipped for Bazel 8.
135135common --nolegacy_external_runfiles
136- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=legacy_external_runfiles
136+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=legacy_external_runfiles
137137
138138# On CI, don't download remote outputs to the local machine.
139139# Most CI pipelines don't need to access the files and they can remain at rest on the remote cache.
@@ -146,92 +146,92 @@ common --nolegacy_external_runfiles
146146# - Perform a second bazel command with specific targets and override this flag with the `toplevel` value.
147147# - To copy executable targets, you can use `bazel run --run_under=cp //some:binary_target <destination path>`.
148148common:ci --remote_download_outputs="minimal"
149- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=remote_download_outputs
149+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=remote_download_outputs
150150
151151# On CI, fall back to standalone local execution strategy if remote execution fails.
152152# Otherwise, when a grpc remote cache connection fails, it would fail the build.
153153common:ci --remote_local_fallback
154- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=remote_local_fallback
154+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=remote_local_fallback
155155
156156# On CI, extend the maximum amount of time to wait for remote execution and cache calls.
157157common:ci --remote_timeout=3600
158- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=remote_timeout
158+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=remote_timeout
159159
160160# Do not upload locally executed action results to the remote cache.
161161# This should be the default for local builds so local builds cannot poison the remote cache.
162162#
163163# Note that this flag is flipped to True under --config=ci, see below.
164164common --noremote_upload_local_results
165- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=remote_upload_local_results
165+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=remote_upload_local_results
166166
167167# On CI, upload locally executed action results to the remote cache.
168168common:ci --remote_upload_local_results
169- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=remote_upload_local_results
169+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=remote_upload_local_results
170170
171171# Repository rules, such as rules_jvm_external: put Bazel's JDK on the path.
172172# Avoids non-hermeticity from dependency on a JAVA_HOME pointing at a system JDK
173173# see https://github.com/bazelbuild/rules_jvm_external/issues/445
174174common --repo_env="JAVA_HOME=../bazel_tools/jdk"
175- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=repo_env
175+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=repo_env
176176
177177# Reuse sandbox directories between invocations.
178178# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
179179# Saves time on sandbox creation and deletion when many of the same kind of action is spawned during the build.
180180common --reuse_sandbox_directories
181- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=reuse_sandbox_directories
181+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=reuse_sandbox_directories
182182
183183# Don't allow network access for build actions in the sandbox by default.
184184# Avoids accidental non-hermeticity in actions/tests which depend on remote services.
185185# Developers should tag targets with `tags=["requires-network"]` to be explicit that they need network access.
186186# Note that the sandbox cannot print a message to the console if it denies network access,
187187# so failures under this flag appear as application errors in the networking layer.
188188common --nosandbox_default_allow_network
189- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=sandbox_default_allow_network
189+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=sandbox_default_allow_network
190190
191191# Only show progress every 60 seconds on CI.
192192# We want to find a compromise between printing often enough to show that the build isn't stuck,
193193# but not so often that we produce a long log file that requires a lot of scrolling.
194194common:ci --show_progress_rate_limit=60
195- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=show_progress_rate_limit
195+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=show_progress_rate_limit
196196
197197# The printed files are convenient strings for copy+pasting to the shell, to execute them.
198198# This option requires an integer argument, which is the threshold number of targets above which result information is not printed.
199199# Show the output files created by builds that requested more than one target.
200200# This helps users locate the build outputs in more cases.
201201common --show_result=20
202- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=show_result
202+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=show_result
203203
204204# On CI, add a timestamp to each message generated by Bazel specifying the time at which the message was displayed.
205205# This makes it easier to reason about what were the slowest steps on CI.
206206common:ci --show_timestamps
207- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=show_timestamps
207+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=show_timestamps
208208
209209# The terminal width in columns. Configure this to override the default value based on what your CI system renders.
210210common:ci --terminal_columns=143
211- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=terminal_columns
211+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=terminal_columns
212212
213213# Output test errors to stderr so users don't have to `cat` or open test failure log files when test fail.
214214# This makes the log noisier in exchange for reducing the time-to-feedback on test failures for users.
215215common --test_output="errors"
216- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=test_output
216+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=test_output
217217
218218# Stream stdout/stderr output from each test in real-time.
219219# This provides immediate feedback during test execution, useful for debugging test failures.
220220common:debug --test_output="streamed"
221- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=test_output
221+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=test_output
222222
223223# Run one test at a time in exclusive mode.
224224# This prevents test interference and provides clearer output when debugging test issues.
225225common:debug --test_strategy="exclusive"
226- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=test_strategy
226+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=test_strategy
227227
228228# The default test_summary ("short") prints a result for every test target that was executed.
229229# In a large repo this amounts to hundreds of lines of additional log output when testing a broad wildcard pattern like //...
230230# This value means to print information only about unsuccessful tests that were run.
231231test:ci --test_summary="terse"
232- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=test_summary
232+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=test_summary
233233
234234# Prevent long running tests from timing out.
235235# Set to a high value to allow tests to complete even if they take longer than expected.
236236common:debug --test_timeout=9999
237- # Docs: https://registry.build/flag/bazel@7.3.1 ?filter=test_timeout
237+ # Docs: https://registry.build/flag/bazel@7.5.0 ?filter=test_timeout
0 commit comments