From 5077d5ae4a726672115b5e0f0ebb9b1ef4f19e44 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Mon, 16 Oct 2023 13:35:41 -0700 Subject: [PATCH] chore: remove bazel5 presets (#614) --- .aspect/bazelrc/bazel5.bazelrc | 5 ---- docs/bazelrc_presets.md | 2 +- lib/bazelrc_presets.bzl | 1 - lib/tests/bazelrc_presets/all/bazel5.bazelrc | 5 ---- lib/tests/bazelrc_presets/subset/BUILD.bazel | 2 +- .../bazelrc_presets/subset/bazel5.bazelrc | 5 ---- .../subset/convenience.bazelrc | 28 +++++++++++++++++++ 7 files changed, 30 insertions(+), 18 deletions(-) delete mode 100644 .aspect/bazelrc/bazel5.bazelrc delete mode 100644 lib/tests/bazelrc_presets/all/bazel5.bazelrc delete mode 100644 lib/tests/bazelrc_presets/subset/bazel5.bazelrc create mode 100644 lib/tests/bazelrc_presets/subset/convenience.bazelrc diff --git a/.aspect/bazelrc/bazel5.bazelrc b/.aspect/bazelrc/bazel5.bazelrc deleted file mode 100644 index c9d7744..0000000 --- a/.aspect/bazelrc/bazel5.bazelrc +++ /dev/null @@ -1,5 +0,0 @@ -# Performance improvement for WORKSPACE evaluation -# of slow rulesets, for example rules_k8s has been -# observed to take 10 seconds without this flag. -# See https://github.com/bazelbuild/bazel/issues/13907 -common --incompatible_existing_rules_immutable_view diff --git a/docs/bazelrc_presets.md b/docs/bazelrc_presets.md index 1c9dc3b..b88933a 100644 --- a/docs/bazelrc_presets.md +++ b/docs/bazelrc_presets.md @@ -27,7 +27,7 @@ See https://docs.aspect.build/guides/bazelrc for more info. | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | a unique name for this target | none | -| presets | a list of preset names to keep up-to-date

For example,

 write_aspect_bazelrc_presets(   name = "update_aspect_bazelrc_presets",   presets = [     "bazel6",     "ci",     "convenience",     "correctness",     "debug",     "javascript",     "performance",   ], ) 
| ["bazel5", "bazel6", "ci", "convenience", "correctness", "debug", "javascript", "performance"] | +| presets | a list of preset names to keep up-to-date

For example,

 write_aspect_bazelrc_presets(   name = "update_aspect_bazelrc_presets",   presets = [     "bazel6",     "ci",     "convenience",     "correctness",     "debug",     "javascript",     "performance",   ], ) 
| ["bazel6", "ci", "convenience", "correctness", "debug", "javascript", "performance"] | | kwargs | Additional arguments to pass to write_source_files | none | diff --git a/lib/bazelrc_presets.bzl b/lib/bazelrc_presets.bzl index 271edeb..1d24969 100644 --- a/lib/bazelrc_presets.bzl +++ b/lib/bazelrc_presets.bzl @@ -3,7 +3,6 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") ALL_PRESETS = [ - "bazel5", "bazel6", "ci", "convenience", diff --git a/lib/tests/bazelrc_presets/all/bazel5.bazelrc b/lib/tests/bazelrc_presets/all/bazel5.bazelrc deleted file mode 100644 index c9d7744..0000000 --- a/lib/tests/bazelrc_presets/all/bazel5.bazelrc +++ /dev/null @@ -1,5 +0,0 @@ -# Performance improvement for WORKSPACE evaluation -# of slow rulesets, for example rules_k8s has been -# observed to take 10 seconds without this flag. -# See https://github.com/bazelbuild/bazel/issues/13907 -common --incompatible_existing_rules_immutable_view diff --git a/lib/tests/bazelrc_presets/subset/BUILD.bazel b/lib/tests/bazelrc_presets/subset/BUILD.bazel index 3304432..d6368c6 100644 --- a/lib/tests/bazelrc_presets/subset/BUILD.bazel +++ b/lib/tests/bazelrc_presets/subset/BUILD.bazel @@ -4,7 +4,7 @@ write_aspect_bazelrc_presets( name = "update_aspect_bazelrc_presets", presets = [ # Just pick a few to test the `presets` attribute - "bazel5", + "convenience", "javascript", ], ) diff --git a/lib/tests/bazelrc_presets/subset/bazel5.bazelrc b/lib/tests/bazelrc_presets/subset/bazel5.bazelrc deleted file mode 100644 index c9d7744..0000000 --- a/lib/tests/bazelrc_presets/subset/bazel5.bazelrc +++ /dev/null @@ -1,5 +0,0 @@ -# Performance improvement for WORKSPACE evaluation -# of slow rulesets, for example rules_k8s has been -# observed to take 10 seconds without this flag. -# See https://github.com/bazelbuild/bazel/issues/13907 -common --incompatible_existing_rules_immutable_view diff --git a/lib/tests/bazelrc_presets/subset/convenience.bazelrc b/lib/tests/bazelrc_presets/subset/convenience.bazelrc new file mode 100644 index 0000000..c674569 --- /dev/null +++ b/lib/tests/bazelrc_presets/subset/convenience.bazelrc @@ -0,0 +1,28 @@ +# Attempt to build & test every target whose prerequisites were successfully built. +# Docs: https://bazel.build/docs/user-manual#keep-going +build --keep_going + +# 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 noiser in exchange for reducing the time-to-feedback on test failures for +# users. +# Docs: https://bazel.build/docs/user-manual#test-output +test --test_output=errors + +# Show the output files created by builds that requested more than one target. This helps users +# locate the build outputs in more cases +# Docs: https://bazel.build/docs/user-manual#show-result +build --show_result=20 + +# 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. +# Docs: https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config +common --enable_platform_specific_config + +# 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 may need to configure CI to capture this artifact and upload for later use. +# Docs: https://bazel.build/reference/command-line-reference#flag--heap_dump_on_oom +common --heap_dump_on_oom