diff --git a/.aspect/cli/config.yaml b/.aspect/cli/config.yaml deleted file mode 100644 index 0388af9..0000000 --- a/.aspect/cli/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -configure: - languages: - javascript: true - go: false - kotlin: false - protobuf: false diff --git a/.aspect/config.axl b/.aspect/config.axl new file mode 100644 index 0000000..d2a4fff --- /dev/null +++ b/.aspect/config.axl @@ -0,0 +1,32 @@ +"""Aspect CLI configuration.""" + +load("@aspect//feature/artifacts.axl", "ArtifactUpload") +load("@aspect//traits.axl", "BazelTrait") +load("@aspect//format.axl", "format") + +# `aspect buildifier` — alias of `aspect format` preset to the Starlark-only +# formatter target. CI and local users can run `aspect buildifier` instead +# of `aspect format --formatter-target=//tools/format:buildifier`. +buildifier = format.alias( + defaults = { + "formatter_target": "//tools/format:buildifier", + }, + summary = "Format Starlark files using buildifier.", +) + +def config(ctx: ConfigContext): + is_ci = bool(ctx.std.env.var("CI")) + + if is_ci: + ctx.traits[BazelTrait].extra_flags.extend([ + "--config=ci", + ]) + + # Register the buildifier alias as a real CLI command. + ctx.tasks.add(buildifier) + + # Enable artifact uploads for testlogs, profile, and BEP. + # upload_test_logs="failed" — only the logs from failing tests are useful. + ctx.features[ArtifactUpload].args.upload_test_logs = "failed" + ctx.features[ArtifactUpload].args.upload_profile = True + ctx.features[ArtifactUpload].args.upload_bep = True diff --git a/.aspect/version.axl b/.aspect/version.axl new file mode 100644 index 0000000..9ac4a4c --- /dev/null +++ b/.aspect/version.axl @@ -0,0 +1 @@ +version("2026.21.30") diff --git a/.aspect/workflows/bazelrc b/.aspect/workflows/bazelrc deleted file mode 100644 index 51dae69..0000000 --- a/.aspect/workflows/bazelrc +++ /dev/null @@ -1,3 +0,0 @@ -# build without the bytes -common --remote_download_outputs=minimal -common --nobuild_runfile_links diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml deleted file mode 100644 index 9414dfb..0000000 --- a/.aspect/workflows/config.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# See https://docs.aspect.build/workflows/configuration -workspaces: - .: - tasks: - - test: - e2e/smoke: - tasks: - - test: - queue: aspect-medium - - format: - without: true - - configure: - without: true - - buildifier: - without: true -bazel: - flags: - - --config=ci -tasks: - - test: - - format: - queue: aspect-medium - - configure: - queue: aspect-medium - flags: - - buildifier: - queue: aspect-medium - - finalization: - queue: aspect-small -notifications: - github: {} diff --git a/.bazelrc b/.bazelrc index 7b4f945..8d1afdf 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,11 @@ import %workspace%/tools/preset.bazelrc common --config=ruleset + +# Build without the bytes +common:ci --remote_download_outputs=minimal +common:ci --nobuild_runfile_links + +# Override the preset's `--lockfile_mode=error` on CI since we don't +# yet commit MODULE.bazel.lock — see .gitignore. +common:ci --lockfile_mode=off diff --git a/.bazelversion b/.bazelversion index 18bb418..93c8dda 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.5.0 +7.6.0 diff --git a/.github/workflows/buildifier.yaml b/.github/workflows/buildifier.yaml deleted file mode 100644 index 3aa5b82..0000000 --- a/.github/workflows/buildifier.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Buildifier - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [main] - pull_request: - branches: [main] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: buildifier - run: bazel run --enable_bzlmod //:buildifier.check diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci-vanilla-bazel.yaml similarity index 85% rename from .github/workflows/ci.yaml rename to .github/workflows/ci-vanilla-bazel.yaml index 1e01dd0..7780c60 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci-vanilla-bazel.yaml @@ -1,18 +1,13 @@ -name: CI -# Controls when the action will run. +name: CI - Vanilla Bazel on: - # Triggers the workflow on push or pull request events but only for the main branch push: branches: [main] pull_request: branches: [main] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: concurrency: - # Cancel previous actions from the same PR or branch except 'main' branch. - # See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. - group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} - cancel-in-progress: ${{ github.ref_name != 'main' }} + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: # Prepares dynamic test matrix values matrix-prep: diff --git a/.github/workflows/ci-workflows.yaml b/.github/workflows/ci-workflows.yaml new file mode 100644 index 0000000..b5d7082 --- /dev/null +++ b/.github/workflows/ci-workflows.yaml @@ -0,0 +1,88 @@ +name: CI - Aspect Workflows +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: +permissions: + id-token: write +env: + ASPECT_API_TOKEN: ${{ secrets.ASPECT_API_TOKEN }} + # Pin the version of aspect-launcher to install to avoid GitHub API rate limiting from `latest` lookups in CI. + INSTALL_ASPECT_LAUNCHER_VERSION: 2026.21.21 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-test-root + repository-cache: true + external-cache: true + - name: Test + run: | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" + aspect test --task-key=test -- //... + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-format-root + repository-cache: true + external-cache: true + - name: Format + run: | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" + aspect format --task-key=format + buildifier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-buildifier-root + repository-cache: true + external-cache: true + - name: Buildifier + run: | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" + aspect buildifier --task-key=buildifier + test-e2e-smoke: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-test-e2e-smoke + repository-cache: true + external-cache: true + - name: Test (e2e/smoke) + working-directory: e2e/smoke + run: | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" + aspect test --task-key=test-e2e-smoke -- //... + gazelle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }}-gazelle-root + repository-cache: true + external-cache: true + - name: Gazelle + run: | + curl -fsSL https://install.aspect.build | bash -s -- "$INSTALL_ASPECT_LAUNCHER_VERSION" + aspect gazelle --task-key=gazelle diff --git a/.gitignore b/.gitignore index a597df8..73dbc6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ bazel-* -.bazelrc.user node_modules/ .pnpm-* diff --git a/BUILD.bazel b/BUILD.bazel index 6bf8586..a3e9e0f 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,26 +1,15 @@ -load("@buildifier_prebuilt//:rules.bzl", "buildifier") load("@npm//:defs.bzl", "npm_link_all_packages") npm_link_all_packages(name = "node_modules") -buildifier( - name = "buildifier", - exclude_patterns = ["./.git/*"], - lint_mode = "fix", - mode = "fix", - tags = ["manual"], # tag as manual so windows ci does not build it by default -) - -buildifier( - name = "buildifier.check", - exclude_patterns = ["./.git/*"], - lint_mode = "warn", - mode = "diff", +alias( + name = "format", + actual = "//tools/format", tags = ["manual"], # tag as manual so windows ci does not build it by default ) alias( - name = "format", - actual = "//tools/format", + name = "buildifier", + actual = "//tools/format:buildifier", tags = ["manual"], # tag as manual so windows ci does not build it by default ) diff --git a/MODULE.bazel b/MODULE.bazel index 38c9d3a..be5eae5 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -16,6 +16,7 @@ use_repo(tel, "aspect_tools_telemetry_report") ####### Dev dependencies ######## +bazel_dep(name = "aspect_gazelle_prebuilt", version = "0.0.11", dev_dependency = True) bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc9", dev_dependency = True) bazel_dep(name = "bazelrc-preset.bzl", version = "1.1.0", dev_dependency = True) bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) diff --git a/README.md b/README.md index 4bff871..cd760e8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Bazel rules for terser +> [!NOTE] +> This repository uses the [Aspect CLI](https://github.com/aspect-build/aspect-cli) for CI and local development. +> See the [docs](https://docs.aspect.build/cli/overview) and [install instructions](https://docs.aspect.build/cli/install) to get started. + [terser](https://terser.org/) is a JavaScript minifier. These rules teach Bazel how to interact with the [terser CLI](https://terser.org/docs/cli-usage). diff --git a/tools/format/BUILD.bazel b/tools/format/BUILD.bazel index 2b41075..f87bdb5 100644 --- a/tools/format/BUILD.bazel +++ b/tools/format/BUILD.bazel @@ -1,11 +1,19 @@ load("@aspect_rules_lint//format:defs.bzl", "format_multirun") +package(default_visibility = ["//:__subpackages__"]) + format_multirun( name = "format", go = "@aspect_rules_lint//format:gofumpt", shell = "@aspect_rules_lint//format:shfmt", - starlark = "@buildifier_prebuilt//:buildifier", tags = ["manual"], - visibility = ["//:__subpackages__"], yaml = "@aspect_rules_lint//format:yamlfmt", ) + +# Starlark-only formatter for the dedicated buildifier CI step. +# See https://docs.aspect.build/cli/migration/buildifier. +format_multirun( + name = "buildifier", + starlark = "@buildifier_prebuilt//:buildifier", + tags = ["manual"], +) diff --git a/tools/gazelle/BUILD.bazel b/tools/gazelle/BUILD.bazel new file mode 100644 index 0000000..27d7f46 --- /dev/null +++ b/tools/gazelle/BUILD.bazel @@ -0,0 +1,8 @@ +load("@aspect_gazelle_prebuilt//:def.bzl", "aspect_gazelle") + +package(default_visibility = ["//:__subpackages__"]) + +aspect_gazelle( + name = "gazelle", + languages = ["js"], +) diff --git a/tools/preset.bazelrc b/tools/preset.bazelrc index 88fceee..e5950a2 100644 --- a/tools/preset.bazelrc +++ b/tools/preset.bazelrc @@ -6,23 +6,23 @@ # beginning of each Bazel invocation. This is very useful on CI to be able to inspect which flags # are being applied on each run based on the order of overrides. common:ci --announce_rc -# Docs: https://registry.build/flag/bazel@7.5.0?filter=announce_rc +# Docs: https://registry.build/flag/bazel@7.6.0?filter=announce_rc # Avoid creating a runfiles tree for binaries or tests until it is needed. # See https://github.com/bazelbuild/bazel/issues/6627 # This may break local workflows that `build` a binary target, then run the resulting program outside of `bazel run`. # In those cases, the script will need to call `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program. common --nobuild_runfile_links -# Docs: https://registry.build/flag/bazel@7.5.0?filter=build_runfile_links +# Docs: https://registry.build/flag/bazel@7.6.0?filter=build_runfile_links # See https://github.com/bazelbuild/bazel/issues/20577 coverage --build_runfile_links -# Docs: https://registry.build/flag/bazel@7.5.0?filter=build_runfile_links +# Docs: https://registry.build/flag/bazel@7.6.0?filter=build_runfile_links # Always run tests even if they have cached results. # This ensures tests are executed fresh each time, useful for debugging and ensuring test reliability. common:debug --nocache_test_results -# Docs: https://registry.build/flag/bazel@7.5.0?filter=cache_test_results +# Docs: https://registry.build/flag/bazel@7.6.0?filter=cache_test_results # Don’t encourage a rules author to update their deps if not needed. # These bazel_dep calls should indicate the minimum version constraint of the ruleset. @@ -31,33 +31,33 @@ common:debug --nocache_test_results # Context: # https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0 common:ruleset --check_direct_dependencies="off" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=check_direct_dependencies +# Docs: https://registry.build/flag/bazel@7.6.0?filter=check_direct_dependencies # On CI, use colors to highlight output on the screen. Set to `no` if your CI does not display colors. common:ci --color="yes" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=color +# Docs: https://registry.build/flag/bazel@7.6.0?filter=color # On CI, use cursor controls in screen output. common:ci --curses="yes" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=curses +# Docs: https://registry.build/flag/bazel@7.6.0?filter=curses # Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is # Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS # identifiers are `linux`, `macos`, `windows`, `freebsd`, and `openbsd`. Enabling this flag is # equivalent to using `--config=linux` on Linux, `--config=windows` on Windows, etc. common --enable_platform_specific_config -# Docs: https://registry.build/flag/bazel@7.5.0?filter=enable_platform_specific_config +# Docs: https://registry.build/flag/bazel@7.6.0?filter=enable_platform_specific_config # Speed up all builds by not checking if external repository files have been modified. # For reference: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244 common --noexperimental_check_external_repository_files -# Docs: https://registry.build/flag/bazel@7.5.0?filter=experimental_check_external_repository_files +# Docs: https://registry.build/flag/bazel@7.6.0?filter=experimental_check_external_repository_files # Always download coverage files for tests from the remote cache. By default, coverage files are not # downloaded on test result cache hits when --remote_download_minimal is enabled, making it impossible # to generate a full coverage report. common --experimental_fetch_all_coverage_outputs -# Docs: https://registry.build/flag/bazel@7.5.0?filter=experimental_fetch_all_coverage_outputs +# Docs: https://registry.build/flag/bazel@7.6.0?filter=experimental_fetch_all_coverage_outputs # This flag was added in Bazel 6.2.0 with a default of zero: # https://github.com/bazelbuild/bazel/commit/24b45890c431de98d586fdfe5777031612049135 @@ -65,7 +65,7 @@ common --experimental_fetch_all_coverage_outputs # https://github.com/bazelbuild/bazel/commit/739e37de66f4913bec1a55b2f2a162e7db6f2d0f # Back-port the updated flag default value to older Bazel versions. common --experimental_remote_cache_eviction_retries=5 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=experimental_remote_cache_eviction_retries +# Docs: https://registry.build/flag/bazel@7.6.0?filter=experimental_remote_cache_eviction_retries # This flag was added in Bazel 5.0.0 with a default of zero: # https://github.com/bazelbuild/bazel/commit/a1137ec1338d9549fd34a9a74502ffa58c286a8e @@ -73,7 +73,7 @@ common --experimental_remote_cache_eviction_retries=5 # https://github.com/bazelbuild/bazel/commit/9335cf989ee6a678ca10bc4da72214634cef0a57 # Back-port the updated flag default value to older Bazel versions. common --experimental_repository_downloader_retries=5 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=experimental_repository_downloader_retries +# Docs: https://registry.build/flag/bazel@7.6.0?filter=experimental_repository_downloader_retries # Set this flag to enable re-tries of failed tests on CI. # When any test target fails, try one or more times. This applies regardless of whether the "flaky" @@ -88,25 +88,25 @@ common --experimental_repository_downloader_retries=5 # # Note that when passing after the first attempt, Bazel will give a special "FLAKY" status rather than "PASSED". test:ci --flaky_test_attempts=2 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=flaky_test_attempts +# Docs: https://registry.build/flag/bazel@7.6.0?filter=flaky_test_attempts # Fixes builds hanging on CI that get the TCP connection closed without sending RST packets. common:ci --grpc_keepalive_time="30s" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=grpc_keepalive_time +# Docs: https://registry.build/flag/bazel@7.6.0?filter=grpc_keepalive_time # Output a heap dump if an OOM is thrown during a Bazel invocation # (including OOMs due to `--experimental_oom_more_eagerly_threshold`). # The dump will be written to `/.heapdump.hprof`. # You should configure CI to upload this artifact for later inspection. common --heap_dump_on_oom -# Docs: https://registry.build/flag/bazel@7.5.0?filter=heap_dump_on_oom +# Docs: https://registry.build/flag/bazel@7.6.0?filter=heap_dump_on_oom # Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server # notices when a directory changes, if you have a directory listed in the srcs of some target. # Recommended when using [copy_directory](https://github.com/bazel-contrib/bazel-lib/blob/main/docs/copy_directory.md) # and [rules_js](https://github.com/aspect-build/rules_js) since npm package are source directories inputs to copy_directory actions. startup --host_jvm_args="-DBAZEL_TRACK_SOURCE_DIRECTORIES=1" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=host_jvm_args +# Docs: https://registry.build/flag/bazel@7.6.0?filter=host_jvm_args # By default, Bazel automatically creates __init__.py files for py_binary and py_test targets. # From https://github.com/bazelbuild/bazel/issues/10076: @@ -114,26 +114,26 @@ startup --host_jvm_args="-DBAZEL_TRACK_SOURCE_DIRECTORIES=1" # > Python programmers are already used to creating __init__.py files in their source trees, # > so doing it behind their backs introduces confusion and changes the semantics of imports common --incompatible_default_to_explicit_init_py -# Docs: https://registry.build/flag/bazel@7.5.0?filter=incompatible_default_to_explicit_init_py +# Docs: https://registry.build/flag/bazel@7.6.0?filter=incompatible_default_to_explicit_init_py # Disallow empty glob patterns. # The glob() function tends to be error-prone, because any typo in a path will silently return an empty list. # This flag was added in Bazel 0.27 and flipped in Bazel 8: https://github.com/bazelbuild/bazel/issues/8195 common --incompatible_disallow_empty_glob -# Docs: https://registry.build/flag/bazel@7.5.0?filter=incompatible_disallow_empty_glob +# Docs: https://registry.build/flag/bazel@7.6.0?filter=incompatible_disallow_empty_glob # Make builds more reproducible by using a static value for PATH and not inheriting LD_LIBRARY_PATH. # Use `--action_env=ENV_VARIABLE` if you want to inherit specific variables from the environment where Bazel runs. # Note that doing so can prevent cross-user caching if a shared cache is used. # See https://github.com/bazelbuild/bazel/issues/2574 for more details. common --incompatible_strict_action_env -# Docs: https://registry.build/flag/bazel@7.5.0?filter=incompatible_strict_action_env +# Docs: https://registry.build/flag/bazel@7.6.0?filter=incompatible_strict_action_env # Performance improvement: avoid laying out a second copy of the runfiles tree. # See https://github.com/bazelbuild/bazel/issues/23574. # This flag was flipped for Bazel 8. common --nolegacy_external_runfiles -# Docs: https://registry.build/flag/bazel@7.5.0?filter=legacy_external_runfiles +# Docs: https://registry.build/flag/bazel@7.6.0?filter=legacy_external_runfiles # On CI, don't download remote outputs to the local machine. # Most CI pipelines don't need to access the files and they can remain at rest on the remote cache. @@ -146,39 +146,39 @@ common --nolegacy_external_runfiles # - Perform a second bazel command with specific targets and override this flag with the `toplevel` value. # - To copy executable targets, you can use `bazel run --run_under=cp //some:binary_target `. common:ci --remote_download_outputs="minimal" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=remote_download_outputs +# Docs: https://registry.build/flag/bazel@7.6.0?filter=remote_download_outputs # On CI, fall back to standalone local execution strategy if remote execution fails. # Otherwise, when a grpc remote cache connection fails, it would fail the build. common:ci --remote_local_fallback -# Docs: https://registry.build/flag/bazel@7.5.0?filter=remote_local_fallback +# Docs: https://registry.build/flag/bazel@7.6.0?filter=remote_local_fallback # On CI, extend the maximum amount of time to wait for remote execution and cache calls. common:ci --remote_timeout=3600 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=remote_timeout +# Docs: https://registry.build/flag/bazel@7.6.0?filter=remote_timeout # Do not upload locally executed action results to the remote cache. # This should be the default for local builds so local builds cannot poison the remote cache. # # Note that this flag is flipped to True under --config=ci, see below. common --noremote_upload_local_results -# Docs: https://registry.build/flag/bazel@7.5.0?filter=remote_upload_local_results +# Docs: https://registry.build/flag/bazel@7.6.0?filter=remote_upload_local_results # On CI, upload locally executed action results to the remote cache. common:ci --remote_upload_local_results -# Docs: https://registry.build/flag/bazel@7.5.0?filter=remote_upload_local_results +# Docs: https://registry.build/flag/bazel@7.6.0?filter=remote_upload_local_results # Repository rules, such as rules_jvm_external: put Bazel's JDK on the path. # Avoids non-hermeticity from dependency on a JAVA_HOME pointing at a system JDK # see https://github.com/bazelbuild/rules_jvm_external/issues/445 common --repo_env="JAVA_HOME=../bazel_tools/jdk" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=repo_env +# Docs: https://registry.build/flag/bazel@7.6.0?filter=repo_env # Reuse sandbox directories between invocations. # Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. # Saves time on sandbox creation and deletion when many of the same kind of action is spawned during the build. common --reuse_sandbox_directories -# Docs: https://registry.build/flag/bazel@7.5.0?filter=reuse_sandbox_directories +# Docs: https://registry.build/flag/bazel@7.6.0?filter=reuse_sandbox_directories # Don't allow network access for build actions in the sandbox by default. # Avoids accidental non-hermeticity in actions/tests which depend on remote services. @@ -186,52 +186,52 @@ common --reuse_sandbox_directories # Note that the sandbox cannot print a message to the console if it denies network access, # so failures under this flag appear as application errors in the networking layer. common --nosandbox_default_allow_network -# Docs: https://registry.build/flag/bazel@7.5.0?filter=sandbox_default_allow_network +# Docs: https://registry.build/flag/bazel@7.6.0?filter=sandbox_default_allow_network # Only show progress every 60 seconds on CI. # We want to find a compromise between printing often enough to show that the build isn't stuck, # but not so often that we produce a long log file that requires a lot of scrolling. common:ci --show_progress_rate_limit=60 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=show_progress_rate_limit +# Docs: https://registry.build/flag/bazel@7.6.0?filter=show_progress_rate_limit # The printed files are convenient strings for copy+pasting to the shell, to execute them. # This option requires an integer argument, which is the threshold number of targets above which result information is not printed. # Show the output files created by builds that requested more than one target. # This helps users locate the build outputs in more cases. common --show_result=20 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=show_result +# Docs: https://registry.build/flag/bazel@7.6.0?filter=show_result # On CI, add a timestamp to each message generated by Bazel specifying the time at which the message was displayed. # This makes it easier to reason about what were the slowest steps on CI. common:ci --show_timestamps -# Docs: https://registry.build/flag/bazel@7.5.0?filter=show_timestamps +# Docs: https://registry.build/flag/bazel@7.6.0?filter=show_timestamps # The terminal width in columns. Configure this to override the default value based on what your CI system renders. common:ci --terminal_columns=143 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=terminal_columns +# Docs: https://registry.build/flag/bazel@7.6.0?filter=terminal_columns # Output test errors to stderr so users don't have to `cat` or open test failure log files when test fail. # This makes the log noisier in exchange for reducing the time-to-feedback on test failures for users. common --test_output="errors" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=test_output +# Docs: https://registry.build/flag/bazel@7.6.0?filter=test_output # Stream stdout/stderr output from each test in real-time. # This provides immediate feedback during test execution, useful for debugging test failures. common:debug --test_output="streamed" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=test_output +# Docs: https://registry.build/flag/bazel@7.6.0?filter=test_output # Run one test at a time in exclusive mode. # This prevents test interference and provides clearer output when debugging test issues. common:debug --test_strategy="exclusive" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=test_strategy +# Docs: https://registry.build/flag/bazel@7.6.0?filter=test_strategy # The default test_summary ("short") prints a result for every test target that was executed. # In a large repo this amounts to hundreds of lines of additional log output when testing a broad wildcard pattern like //... # This value means to print information only about unsuccessful tests that were run. test:ci --test_summary="terse" -# Docs: https://registry.build/flag/bazel@7.5.0?filter=test_summary +# Docs: https://registry.build/flag/bazel@7.6.0?filter=test_summary # Prevent long running tests from timing out. # Set to a high value to allow tests to complete even if they take longer than expected. common:debug --test_timeout=9999 -# Docs: https://registry.build/flag/bazel@7.5.0?filter=test_timeout +# Docs: https://registry.build/flag/bazel@7.6.0?filter=test_timeout