From e3015cd8fa58319e66ce65c5f456f1603695c6a0 Mon Sep 17 00:00:00 2001 From: Sahin Yort Date: Fri, 22 Sep 2023 13:04:09 -0700 Subject: [PATCH] refactor: cleanup e2e (#542) --- .github/workflows/ci.yaml | 4 -- .../.aspect/bazelrc/BUILD.bazel | 14 ---- .../.aspect/bazelrc/convenience.bazelrc | 28 -------- .../.aspect/bazelrc/correctness.bazelrc | 68 ------------------- .../.aspect/bazelrc/debug.bazelrc | 19 ------ .../.aspect/bazelrc/javascript.bazelrc | 28 -------- .../.aspect/bazelrc/performance.bazelrc | 38 ----------- .../.aspect/cli | 1 - .../.bazelrc | 19 ------ .../WORKSPACE | 2 - .../.aspect/bazelrc/BUILD.bazel | 14 ---- .../.aspect/bazelrc/convenience.bazelrc | 28 -------- .../.aspect/bazelrc/correctness.bazelrc | 68 ------------------- .../.aspect/bazelrc/debug.bazelrc | 19 ------ .../.aspect/bazelrc/javascript.bazelrc | 28 -------- .../.aspect/bazelrc/performance.bazelrc | 38 ----------- e2e/copy_to_directory/.aspect/cli | 1 - e2e/copy_to_directory/.bazelrc | 17 ----- e2e/coreutils/.aspect/bazelrc/BUILD.bazel | 14 ---- .../.aspect/bazelrc/convenience.bazelrc | 28 -------- .../.aspect/bazelrc/correctness.bazelrc | 68 ------------------- e2e/coreutils/.aspect/bazelrc/debug.bazelrc | 19 ------ .../.aspect/bazelrc/javascript.bazelrc | 28 -------- .../.aspect/bazelrc/performance.bazelrc | 38 ----------- e2e/coreutils/.aspect/cli | 1 - e2e/coreutils/.bazelrc | 17 ----- e2e/smoke/.aspect/bazelrc/BUILD.bazel | 14 ---- e2e/smoke/.aspect/bazelrc/convenience.bazelrc | 28 -------- e2e/smoke/.aspect/bazelrc/correctness.bazelrc | 68 ------------------- e2e/smoke/.aspect/bazelrc/debug.bazelrc | 19 ------ e2e/smoke/.aspect/bazelrc/javascript.bazelrc | 28 -------- e2e/smoke/.aspect/bazelrc/performance.bazelrc | 38 ----------- e2e/smoke/.aspect/cli | 1 - e2e/smoke/.bazelrc | 17 ----- .../.bazelrc} | 0 .../.bazelversion | 0 .../BUILD.bazel | 0 .../MODULE.bazel | 2 +- e2e/write_source_files/WORKSPACE | 12 ++++ e2e/write_source_files/WORKSPACE.bzlmod | 0 .../foobar.txt | 0 .../test_extension.bzl | 0 42 files changed, 13 insertions(+), 861 deletions(-) delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/BUILD.bazel delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/convenience.bazelrc delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/correctness.bazelrc delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/debug.bazelrc delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/javascript.bazelrc delete mode 100644 e2e/bzlmod_write_source_files_external/.aspect/bazelrc/performance.bazelrc delete mode 120000 e2e/bzlmod_write_source_files_external/.aspect/cli delete mode 100644 e2e/bzlmod_write_source_files_external/.bazelrc delete mode 100644 e2e/bzlmod_write_source_files_external/WORKSPACE delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/BUILD.bazel delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/convenience.bazelrc delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/correctness.bazelrc delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/debug.bazelrc delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/javascript.bazelrc delete mode 100644 e2e/copy_to_directory/.aspect/bazelrc/performance.bazelrc delete mode 120000 e2e/copy_to_directory/.aspect/cli delete mode 100644 e2e/coreutils/.aspect/bazelrc/BUILD.bazel delete mode 100644 e2e/coreutils/.aspect/bazelrc/convenience.bazelrc delete mode 100644 e2e/coreutils/.aspect/bazelrc/correctness.bazelrc delete mode 100644 e2e/coreutils/.aspect/bazelrc/debug.bazelrc delete mode 100644 e2e/coreutils/.aspect/bazelrc/javascript.bazelrc delete mode 100644 e2e/coreutils/.aspect/bazelrc/performance.bazelrc delete mode 120000 e2e/coreutils/.aspect/cli delete mode 100644 e2e/smoke/.aspect/bazelrc/BUILD.bazel delete mode 100644 e2e/smoke/.aspect/bazelrc/convenience.bazelrc delete mode 100644 e2e/smoke/.aspect/bazelrc/correctness.bazelrc delete mode 100644 e2e/smoke/.aspect/bazelrc/debug.bazelrc delete mode 100644 e2e/smoke/.aspect/bazelrc/javascript.bazelrc delete mode 100644 e2e/smoke/.aspect/bazelrc/performance.bazelrc delete mode 120000 e2e/smoke/.aspect/cli rename e2e/{bzlmod_write_source_files_external/WORKSPACE.bzlmod => write_source_files/.bazelrc} (100%) rename e2e/{bzlmod_write_source_files_external => write_source_files}/.bazelversion (100%) rename e2e/{bzlmod_write_source_files_external => write_source_files}/BUILD.bazel (100%) rename e2e/{bzlmod_write_source_files_external => write_source_files}/MODULE.bazel (85%) create mode 100644 e2e/write_source_files/WORKSPACE create mode 100644 e2e/write_source_files/WORKSPACE.bzlmod rename e2e/{bzlmod_write_source_files_external => write_source_files}/foobar.txt (100%) rename e2e/{bzlmod_write_source_files_external => write_source_files}/test_extension.bzl (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 019384c..8a2f596 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,10 +92,6 @@ jobs: - "e2e/copy_to_directory" - "e2e/smoke" exclude: - # this e2e meant to work under bzlmod - - bzlmodEnabled: false - folder: bzlmod_write_source_files_external - # Don't test Bazel 5.3 with bzlmod. (Unrecognized option: --enable_bzlmod) - bzlmodEnabled: true bazelversion: 5.4.1 diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/BUILD.bazel b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/BUILD.bazel deleted file mode 100644 index 6d65186..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - -load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") - -write_aspect_bazelrc_presets( - name = "update_aspect_bazelrc_presets", - presets = [ - "convenience", - "correctness", - "debug", - "javascript", - "performance", - ], -) diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/convenience.bazelrc b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/convenience.bazelrc deleted file mode 100644 index c674569..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/convenience.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# 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 diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/correctness.bazelrc b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/correctness.bazelrc deleted file mode 100644 index a540eb8..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/correctness.bazelrc +++ /dev/null @@ -1,68 +0,0 @@ -# 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. -# It should be flipped to `--remote_upload_local_results` on CI -# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`. -# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results -build --noremote_upload_local_results - -# Don't allow network access for build actions in the sandbox. -# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote -# services. -# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement. -# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network -build --sandbox_default_allow_network=false - -# Warn if a test's timeout is significantly longer than the test's actual execution time. -# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min). -# While a test's timeout should be set such that it is not flaky, a test that has a highly -# over-generous timeout can hide real problems that crop up unexpectedly. -# For instance, a test that normally executes in a minute or two should not have a timeout of -# ETERNAL or LONG as these are much, much too generous. -# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings -test --test_verbose_timeout_warnings - -# 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/aspect-build/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. -# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args -startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 - -# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for -# tests with `tags=["exclusive"]`. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed -test --incompatible_exclusive_test_sandboxed - -# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment -# variables like `PATH` sneak into the build, which can cause massive cache misses when they change. -# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the -# client, but note that doing so can prevent cross-user caching if a shared cache is used. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env -build --incompatible_strict_action_env - -# Propagate tags from a target declaration to the actions' execution requirements. -# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]` -# get propagated to actions created by the rule. -# Without this option, you rely on rules authors to manually check the tags you passed -# and apply relevant ones to the actions they create. -# See https://github.com/bazelbuild/bazel/issues/8830 for details. -# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation -build --experimental_allow_tags_propagation -fetch --experimental_allow_tags_propagation -query --experimental_allow_tags_propagation - -# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong -# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python -# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the -# default), it is treated as false if and only if this flag is set. See -# https://github.com/bazelbuild/bazel/issues/10076. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py -build --incompatible_default_to_explicit_init_py - -# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when -# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package -# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob -common --incompatible_disallow_empty_glob diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/debug.bazelrc b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/debug.bazelrc deleted file mode 100644 index bfb0bdd..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/debug.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -############################################################ -# Use `bazel test --config=debug` to enable these settings # -############################################################ - -# Stream stdout/stderr output from each test in real-time. -# Docs: https://bazel.build/docs/user-manual#test-output -test:debug --test_output=streamed - -# Run one test at a time. -# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy -test:debug --test_strategy=exclusive - -# Prevent long running tests from timing out. -# Docs: https://bazel.build/docs/user-manual#test-timeout -test:debug --test_timeout=9999 - -# Always run tests even if they have cached results. -# Docs: https://bazel.build/docs/user-manual#cache-test-results -test:debug --nocache_test_results diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/javascript.bazelrc b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/javascript.bazelrc deleted file mode 100644 index dc76864..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/javascript.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Aspect recommended Bazel flags when using Aspect's JavaScript rules: https://github.com/aspect-build/rules_js -# Docs for Node.js flags: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options - -# Support for debugging Node.js tests. Use bazel run with `--config=debug` to turn on the NodeJS -# inspector agent. The node process will break before user code starts and wait for the debugger to -# connect. Pass the --inspect-brk option to all tests which enables the node inspector agent. See -# https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more -# details. -# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options -run:debug -- --node_options=--inspect-brk - -# Enable runfiles on all platforms. Runfiles are on by default on Linux and MacOS but off on -# Windows. -# -# In general, rules_js and derivate rule sets assume that runfiles are enabled and do not support no -# runfiles case because it does not scale to teach all Node.js tools to use the runfiles manifest. -# -# If you are developing on Windows, you must either run bazel with administrator privileges or -# enable developer mode. If you do not you may hit this error on Windows: -# -# Bazel needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -# -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_runfiles -build --enable_runfiles diff --git a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/performance.bazelrc b/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/performance.bazelrc deleted file mode 100644 index fff4c7c..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/bazelrc/performance.bazelrc +++ /dev/null @@ -1,38 +0,0 @@ -# Speed up all builds by not checking if output files have been modified. Lets you make changes to -# the output tree without triggering a build for local debugging. For example, you can modify -# [rules_js](https://github.com/aspect-build/rules_js) 3rd party npm packages in the output tree -# when local debugging. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/pkgcache/PackageOptions.java#L185 -build --noexperimental_check_output_files -fetch --noexperimental_check_output_files -query --noexperimental_check_output_files - -# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. -# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where -# Bazel doesn't write to the local disk cache as it treats as a remote cache. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk -build --incompatible_remote_results_ignore_disk - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --experimental_reuse_sandbox_directories - -# Do not build runfiles symlink forests for external repositories under -# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & -# sandbox creation times & prevents accidentally depending on this feature which may flip to off by -# default in the future. Note, some rules may fail under this flag, please file issues with the rule -# author. -# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles -build --nolegacy_external_runfiles - -# Some actions are always IO-intensive but require little compute. It's wasteful to put the output -# in the remote cache, it just saturates the network and fills the cache storage causing earlier -# evictions. It's also not worth sending them for remote execution. -# For actions like PackageTar it's usually faster to just re-run the work locally every time. -# You'll have to look at an execution log to figure out what other action mnemonics you care about. -# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one. -# https://bazel.build/reference/command-line-reference#flag--modify_execution_info -build --modify_execution_info=PackageTar=+no-remote diff --git a/e2e/bzlmod_write_source_files_external/.aspect/cli b/e2e/bzlmod_write_source_files_external/.aspect/cli deleted file mode 120000 index 0754375..0000000 --- a/e2e/bzlmod_write_source_files_external/.aspect/cli +++ /dev/null @@ -1 +0,0 @@ -../../../.aspect/cli \ No newline at end of file diff --git a/e2e/bzlmod_write_source_files_external/.bazelrc b/e2e/bzlmod_write_source_files_external/.bazelrc deleted file mode 100644 index a3c465e..0000000 --- a/e2e/bzlmod_write_source_files_external/.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -# Bazel settings that apply to this repository. -# Settings that apply only to CI are in .aspect/bazelrc/ci.bazelrc - -# Import Aspect bazelrc presets -import %workspace%/.aspect/bazelrc/convenience.bazelrc -import %workspace%/.aspect/bazelrc/correctness.bazelrc -import %workspace%/.aspect/bazelrc/debug.bazelrc -import %workspace%/.aspect/bazelrc/javascript.bazelrc -import %workspace%/.aspect/bazelrc/performance.bazelrc - -### PROJECT SPECIFIC OPTIONS ### - -common --enable_bzlmod - -# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. -# This file should appear in `.gitignore` so that settings are not shared with team members. This -# should be last statement in this config so the user configuration is able to overwrite flags from -# this file. See https://bazel.build/configure/best-practices#bazelrc-file. -try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/e2e/bzlmod_write_source_files_external/WORKSPACE b/e2e/bzlmod_write_source_files_external/WORKSPACE deleted file mode 100644 index 79d35f9..0000000 --- a/e2e/bzlmod_write_source_files_external/WORKSPACE +++ /dev/null @@ -1,2 +0,0 @@ -# Marker file that this folder is the root of a Bazel workspace. -# See MODULE.bazel for dependencies and setup. diff --git a/e2e/copy_to_directory/.aspect/bazelrc/BUILD.bazel b/e2e/copy_to_directory/.aspect/bazelrc/BUILD.bazel deleted file mode 100644 index 6d65186..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - -load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") - -write_aspect_bazelrc_presets( - name = "update_aspect_bazelrc_presets", - presets = [ - "convenience", - "correctness", - "debug", - "javascript", - "performance", - ], -) diff --git a/e2e/copy_to_directory/.aspect/bazelrc/convenience.bazelrc b/e2e/copy_to_directory/.aspect/bazelrc/convenience.bazelrc deleted file mode 100644 index c674569..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/convenience.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# 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 diff --git a/e2e/copy_to_directory/.aspect/bazelrc/correctness.bazelrc b/e2e/copy_to_directory/.aspect/bazelrc/correctness.bazelrc deleted file mode 100644 index a540eb8..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/correctness.bazelrc +++ /dev/null @@ -1,68 +0,0 @@ -# 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. -# It should be flipped to `--remote_upload_local_results` on CI -# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`. -# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results -build --noremote_upload_local_results - -# Don't allow network access for build actions in the sandbox. -# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote -# services. -# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement. -# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network -build --sandbox_default_allow_network=false - -# Warn if a test's timeout is significantly longer than the test's actual execution time. -# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min). -# While a test's timeout should be set such that it is not flaky, a test that has a highly -# over-generous timeout can hide real problems that crop up unexpectedly. -# For instance, a test that normally executes in a minute or two should not have a timeout of -# ETERNAL or LONG as these are much, much too generous. -# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings -test --test_verbose_timeout_warnings - -# 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/aspect-build/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. -# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args -startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 - -# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for -# tests with `tags=["exclusive"]`. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed -test --incompatible_exclusive_test_sandboxed - -# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment -# variables like `PATH` sneak into the build, which can cause massive cache misses when they change. -# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the -# client, but note that doing so can prevent cross-user caching if a shared cache is used. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env -build --incompatible_strict_action_env - -# Propagate tags from a target declaration to the actions' execution requirements. -# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]` -# get propagated to actions created by the rule. -# Without this option, you rely on rules authors to manually check the tags you passed -# and apply relevant ones to the actions they create. -# See https://github.com/bazelbuild/bazel/issues/8830 for details. -# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation -build --experimental_allow_tags_propagation -fetch --experimental_allow_tags_propagation -query --experimental_allow_tags_propagation - -# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong -# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python -# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the -# default), it is treated as false if and only if this flag is set. See -# https://github.com/bazelbuild/bazel/issues/10076. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py -build --incompatible_default_to_explicit_init_py - -# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when -# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package -# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob -common --incompatible_disallow_empty_glob diff --git a/e2e/copy_to_directory/.aspect/bazelrc/debug.bazelrc b/e2e/copy_to_directory/.aspect/bazelrc/debug.bazelrc deleted file mode 100644 index bfb0bdd..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/debug.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -############################################################ -# Use `bazel test --config=debug` to enable these settings # -############################################################ - -# Stream stdout/stderr output from each test in real-time. -# Docs: https://bazel.build/docs/user-manual#test-output -test:debug --test_output=streamed - -# Run one test at a time. -# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy -test:debug --test_strategy=exclusive - -# Prevent long running tests from timing out. -# Docs: https://bazel.build/docs/user-manual#test-timeout -test:debug --test_timeout=9999 - -# Always run tests even if they have cached results. -# Docs: https://bazel.build/docs/user-manual#cache-test-results -test:debug --nocache_test_results diff --git a/e2e/copy_to_directory/.aspect/bazelrc/javascript.bazelrc b/e2e/copy_to_directory/.aspect/bazelrc/javascript.bazelrc deleted file mode 100644 index dc76864..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/javascript.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Aspect recommended Bazel flags when using Aspect's JavaScript rules: https://github.com/aspect-build/rules_js -# Docs for Node.js flags: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options - -# Support for debugging Node.js tests. Use bazel run with `--config=debug` to turn on the NodeJS -# inspector agent. The node process will break before user code starts and wait for the debugger to -# connect. Pass the --inspect-brk option to all tests which enables the node inspector agent. See -# https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more -# details. -# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options -run:debug -- --node_options=--inspect-brk - -# Enable runfiles on all platforms. Runfiles are on by default on Linux and MacOS but off on -# Windows. -# -# In general, rules_js and derivate rule sets assume that runfiles are enabled and do not support no -# runfiles case because it does not scale to teach all Node.js tools to use the runfiles manifest. -# -# If you are developing on Windows, you must either run bazel with administrator privileges or -# enable developer mode. If you do not you may hit this error on Windows: -# -# Bazel needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -# -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_runfiles -build --enable_runfiles diff --git a/e2e/copy_to_directory/.aspect/bazelrc/performance.bazelrc b/e2e/copy_to_directory/.aspect/bazelrc/performance.bazelrc deleted file mode 100644 index fff4c7c..0000000 --- a/e2e/copy_to_directory/.aspect/bazelrc/performance.bazelrc +++ /dev/null @@ -1,38 +0,0 @@ -# Speed up all builds by not checking if output files have been modified. Lets you make changes to -# the output tree without triggering a build for local debugging. For example, you can modify -# [rules_js](https://github.com/aspect-build/rules_js) 3rd party npm packages in the output tree -# when local debugging. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/pkgcache/PackageOptions.java#L185 -build --noexperimental_check_output_files -fetch --noexperimental_check_output_files -query --noexperimental_check_output_files - -# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. -# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where -# Bazel doesn't write to the local disk cache as it treats as a remote cache. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk -build --incompatible_remote_results_ignore_disk - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --experimental_reuse_sandbox_directories - -# Do not build runfiles symlink forests for external repositories under -# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & -# sandbox creation times & prevents accidentally depending on this feature which may flip to off by -# default in the future. Note, some rules may fail under this flag, please file issues with the rule -# author. -# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles -build --nolegacy_external_runfiles - -# Some actions are always IO-intensive but require little compute. It's wasteful to put the output -# in the remote cache, it just saturates the network and fills the cache storage causing earlier -# evictions. It's also not worth sending them for remote execution. -# For actions like PackageTar it's usually faster to just re-run the work locally every time. -# You'll have to look at an execution log to figure out what other action mnemonics you care about. -# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one. -# https://bazel.build/reference/command-line-reference#flag--modify_execution_info -build --modify_execution_info=PackageTar=+no-remote diff --git a/e2e/copy_to_directory/.aspect/cli b/e2e/copy_to_directory/.aspect/cli deleted file mode 120000 index 0754375..0000000 --- a/e2e/copy_to_directory/.aspect/cli +++ /dev/null @@ -1 +0,0 @@ -../../../.aspect/cli \ No newline at end of file diff --git a/e2e/copy_to_directory/.bazelrc b/e2e/copy_to_directory/.bazelrc index 1482aca..e69de29 100644 --- a/e2e/copy_to_directory/.bazelrc +++ b/e2e/copy_to_directory/.bazelrc @@ -1,17 +0,0 @@ -# Bazel settings that apply to this repository. -# Settings that apply only to CI are in .aspect/bazelrc/ci.bazelrc - -# Import Aspect bazelrc presets -import %workspace%/.aspect/bazelrc/convenience.bazelrc -import %workspace%/.aspect/bazelrc/correctness.bazelrc -import %workspace%/.aspect/bazelrc/performance.bazelrc -import %workspace%/.aspect/bazelrc/debug.bazelrc -import %workspace%/.aspect/bazelrc/javascript.bazelrc - -### PROJECT SPECIFIC OPTIONS ### - -# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. -# This file should appear in `.gitignore` so that settings are not shared with team members. This -# should be last statement in this config so the user configuration is able to overwrite flags from -# this file. See https://bazel.build/configure/best-practices#bazelrc-file. -try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/e2e/coreutils/.aspect/bazelrc/BUILD.bazel b/e2e/coreutils/.aspect/bazelrc/BUILD.bazel deleted file mode 100644 index 6d65186..0000000 --- a/e2e/coreutils/.aspect/bazelrc/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - -load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") - -write_aspect_bazelrc_presets( - name = "update_aspect_bazelrc_presets", - presets = [ - "convenience", - "correctness", - "debug", - "javascript", - "performance", - ], -) diff --git a/e2e/coreutils/.aspect/bazelrc/convenience.bazelrc b/e2e/coreutils/.aspect/bazelrc/convenience.bazelrc deleted file mode 100644 index c674569..0000000 --- a/e2e/coreutils/.aspect/bazelrc/convenience.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# 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 diff --git a/e2e/coreutils/.aspect/bazelrc/correctness.bazelrc b/e2e/coreutils/.aspect/bazelrc/correctness.bazelrc deleted file mode 100644 index a540eb8..0000000 --- a/e2e/coreutils/.aspect/bazelrc/correctness.bazelrc +++ /dev/null @@ -1,68 +0,0 @@ -# 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. -# It should be flipped to `--remote_upload_local_results` on CI -# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`. -# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results -build --noremote_upload_local_results - -# Don't allow network access for build actions in the sandbox. -# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote -# services. -# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement. -# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network -build --sandbox_default_allow_network=false - -# Warn if a test's timeout is significantly longer than the test's actual execution time. -# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min). -# While a test's timeout should be set such that it is not flaky, a test that has a highly -# over-generous timeout can hide real problems that crop up unexpectedly. -# For instance, a test that normally executes in a minute or two should not have a timeout of -# ETERNAL or LONG as these are much, much too generous. -# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings -test --test_verbose_timeout_warnings - -# 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/aspect-build/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. -# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args -startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 - -# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for -# tests with `tags=["exclusive"]`. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed -test --incompatible_exclusive_test_sandboxed - -# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment -# variables like `PATH` sneak into the build, which can cause massive cache misses when they change. -# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the -# client, but note that doing so can prevent cross-user caching if a shared cache is used. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env -build --incompatible_strict_action_env - -# Propagate tags from a target declaration to the actions' execution requirements. -# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]` -# get propagated to actions created by the rule. -# Without this option, you rely on rules authors to manually check the tags you passed -# and apply relevant ones to the actions they create. -# See https://github.com/bazelbuild/bazel/issues/8830 for details. -# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation -build --experimental_allow_tags_propagation -fetch --experimental_allow_tags_propagation -query --experimental_allow_tags_propagation - -# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong -# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python -# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the -# default), it is treated as false if and only if this flag is set. See -# https://github.com/bazelbuild/bazel/issues/10076. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py -build --incompatible_default_to_explicit_init_py - -# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when -# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package -# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob -common --incompatible_disallow_empty_glob diff --git a/e2e/coreutils/.aspect/bazelrc/debug.bazelrc b/e2e/coreutils/.aspect/bazelrc/debug.bazelrc deleted file mode 100644 index bfb0bdd..0000000 --- a/e2e/coreutils/.aspect/bazelrc/debug.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -############################################################ -# Use `bazel test --config=debug` to enable these settings # -############################################################ - -# Stream stdout/stderr output from each test in real-time. -# Docs: https://bazel.build/docs/user-manual#test-output -test:debug --test_output=streamed - -# Run one test at a time. -# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy -test:debug --test_strategy=exclusive - -# Prevent long running tests from timing out. -# Docs: https://bazel.build/docs/user-manual#test-timeout -test:debug --test_timeout=9999 - -# Always run tests even if they have cached results. -# Docs: https://bazel.build/docs/user-manual#cache-test-results -test:debug --nocache_test_results diff --git a/e2e/coreutils/.aspect/bazelrc/javascript.bazelrc b/e2e/coreutils/.aspect/bazelrc/javascript.bazelrc deleted file mode 100644 index dc76864..0000000 --- a/e2e/coreutils/.aspect/bazelrc/javascript.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Aspect recommended Bazel flags when using Aspect's JavaScript rules: https://github.com/aspect-build/rules_js -# Docs for Node.js flags: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options - -# Support for debugging Node.js tests. Use bazel run with `--config=debug` to turn on the NodeJS -# inspector agent. The node process will break before user code starts and wait for the debugger to -# connect. Pass the --inspect-brk option to all tests which enables the node inspector agent. See -# https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more -# details. -# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options -run:debug -- --node_options=--inspect-brk - -# Enable runfiles on all platforms. Runfiles are on by default on Linux and MacOS but off on -# Windows. -# -# In general, rules_js and derivate rule sets assume that runfiles are enabled and do not support no -# runfiles case because it does not scale to teach all Node.js tools to use the runfiles manifest. -# -# If you are developing on Windows, you must either run bazel with administrator privileges or -# enable developer mode. If you do not you may hit this error on Windows: -# -# Bazel needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -# -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_runfiles -build --enable_runfiles diff --git a/e2e/coreutils/.aspect/bazelrc/performance.bazelrc b/e2e/coreutils/.aspect/bazelrc/performance.bazelrc deleted file mode 100644 index fff4c7c..0000000 --- a/e2e/coreutils/.aspect/bazelrc/performance.bazelrc +++ /dev/null @@ -1,38 +0,0 @@ -# Speed up all builds by not checking if output files have been modified. Lets you make changes to -# the output tree without triggering a build for local debugging. For example, you can modify -# [rules_js](https://github.com/aspect-build/rules_js) 3rd party npm packages in the output tree -# when local debugging. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/pkgcache/PackageOptions.java#L185 -build --noexperimental_check_output_files -fetch --noexperimental_check_output_files -query --noexperimental_check_output_files - -# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. -# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where -# Bazel doesn't write to the local disk cache as it treats as a remote cache. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk -build --incompatible_remote_results_ignore_disk - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --experimental_reuse_sandbox_directories - -# Do not build runfiles symlink forests for external repositories under -# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & -# sandbox creation times & prevents accidentally depending on this feature which may flip to off by -# default in the future. Note, some rules may fail under this flag, please file issues with the rule -# author. -# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles -build --nolegacy_external_runfiles - -# Some actions are always IO-intensive but require little compute. It's wasteful to put the output -# in the remote cache, it just saturates the network and fills the cache storage causing earlier -# evictions. It's also not worth sending them for remote execution. -# For actions like PackageTar it's usually faster to just re-run the work locally every time. -# You'll have to look at an execution log to figure out what other action mnemonics you care about. -# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one. -# https://bazel.build/reference/command-line-reference#flag--modify_execution_info -build --modify_execution_info=PackageTar=+no-remote diff --git a/e2e/coreutils/.aspect/cli b/e2e/coreutils/.aspect/cli deleted file mode 120000 index 0754375..0000000 --- a/e2e/coreutils/.aspect/cli +++ /dev/null @@ -1 +0,0 @@ -../../../.aspect/cli \ No newline at end of file diff --git a/e2e/coreutils/.bazelrc b/e2e/coreutils/.bazelrc index 1482aca..e69de29 100644 --- a/e2e/coreutils/.bazelrc +++ b/e2e/coreutils/.bazelrc @@ -1,17 +0,0 @@ -# Bazel settings that apply to this repository. -# Settings that apply only to CI are in .aspect/bazelrc/ci.bazelrc - -# Import Aspect bazelrc presets -import %workspace%/.aspect/bazelrc/convenience.bazelrc -import %workspace%/.aspect/bazelrc/correctness.bazelrc -import %workspace%/.aspect/bazelrc/performance.bazelrc -import %workspace%/.aspect/bazelrc/debug.bazelrc -import %workspace%/.aspect/bazelrc/javascript.bazelrc - -### PROJECT SPECIFIC OPTIONS ### - -# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. -# This file should appear in `.gitignore` so that settings are not shared with team members. This -# should be last statement in this config so the user configuration is able to overwrite flags from -# this file. See https://bazel.build/configure/best-practices#bazelrc-file. -try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/e2e/smoke/.aspect/bazelrc/BUILD.bazel b/e2e/smoke/.aspect/bazelrc/BUILD.bazel deleted file mode 100644 index 6d65186..0000000 --- a/e2e/smoke/.aspect/bazelrc/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - -load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") - -write_aspect_bazelrc_presets( - name = "update_aspect_bazelrc_presets", - presets = [ - "convenience", - "correctness", - "debug", - "javascript", - "performance", - ], -) diff --git a/e2e/smoke/.aspect/bazelrc/convenience.bazelrc b/e2e/smoke/.aspect/bazelrc/convenience.bazelrc deleted file mode 100644 index c674569..0000000 --- a/e2e/smoke/.aspect/bazelrc/convenience.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# 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 diff --git a/e2e/smoke/.aspect/bazelrc/correctness.bazelrc b/e2e/smoke/.aspect/bazelrc/correctness.bazelrc deleted file mode 100644 index a540eb8..0000000 --- a/e2e/smoke/.aspect/bazelrc/correctness.bazelrc +++ /dev/null @@ -1,68 +0,0 @@ -# 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. -# It should be flipped to `--remote_upload_local_results` on CI -# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`. -# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results -build --noremote_upload_local_results - -# Don't allow network access for build actions in the sandbox. -# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote -# services. -# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement. -# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network -build --sandbox_default_allow_network=false - -# Warn if a test's timeout is significantly longer than the test's actual execution time. -# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min). -# While a test's timeout should be set such that it is not flaky, a test that has a highly -# over-generous timeout can hide real problems that crop up unexpectedly. -# For instance, a test that normally executes in a minute or two should not have a timeout of -# ETERNAL or LONG as these are much, much too generous. -# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings -test --test_verbose_timeout_warnings - -# 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/aspect-build/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. -# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args -startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 - -# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for -# tests with `tags=["exclusive"]`. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed -test --incompatible_exclusive_test_sandboxed - -# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment -# variables like `PATH` sneak into the build, which can cause massive cache misses when they change. -# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the -# client, but note that doing so can prevent cross-user caching if a shared cache is used. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env -build --incompatible_strict_action_env - -# Propagate tags from a target declaration to the actions' execution requirements. -# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]` -# get propagated to actions created by the rule. -# Without this option, you rely on rules authors to manually check the tags you passed -# and apply relevant ones to the actions they create. -# See https://github.com/bazelbuild/bazel/issues/8830 for details. -# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation -build --experimental_allow_tags_propagation -fetch --experimental_allow_tags_propagation -query --experimental_allow_tags_propagation - -# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong -# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python -# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the -# default), it is treated as false if and only if this flag is set. See -# https://github.com/bazelbuild/bazel/issues/10076. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py -build --incompatible_default_to_explicit_init_py - -# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when -# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package -# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob -common --incompatible_disallow_empty_glob diff --git a/e2e/smoke/.aspect/bazelrc/debug.bazelrc b/e2e/smoke/.aspect/bazelrc/debug.bazelrc deleted file mode 100644 index bfb0bdd..0000000 --- a/e2e/smoke/.aspect/bazelrc/debug.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -############################################################ -# Use `bazel test --config=debug` to enable these settings # -############################################################ - -# Stream stdout/stderr output from each test in real-time. -# Docs: https://bazel.build/docs/user-manual#test-output -test:debug --test_output=streamed - -# Run one test at a time. -# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy -test:debug --test_strategy=exclusive - -# Prevent long running tests from timing out. -# Docs: https://bazel.build/docs/user-manual#test-timeout -test:debug --test_timeout=9999 - -# Always run tests even if they have cached results. -# Docs: https://bazel.build/docs/user-manual#cache-test-results -test:debug --nocache_test_results diff --git a/e2e/smoke/.aspect/bazelrc/javascript.bazelrc b/e2e/smoke/.aspect/bazelrc/javascript.bazelrc deleted file mode 100644 index dc76864..0000000 --- a/e2e/smoke/.aspect/bazelrc/javascript.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Aspect recommended Bazel flags when using Aspect's JavaScript rules: https://github.com/aspect-build/rules_js -# Docs for Node.js flags: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options - -# Support for debugging Node.js tests. Use bazel run with `--config=debug` to turn on the NodeJS -# inspector agent. The node process will break before user code starts and wait for the debugger to -# connect. Pass the --inspect-brk option to all tests which enables the node inspector agent. See -# https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more -# details. -# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options -run:debug -- --node_options=--inspect-brk - -# Enable runfiles on all platforms. Runfiles are on by default on Linux and MacOS but off on -# Windows. -# -# In general, rules_js and derivate rule sets assume that runfiles are enabled and do not support no -# runfiles case because it does not scale to teach all Node.js tools to use the runfiles manifest. -# -# If you are developing on Windows, you must either run bazel with administrator privileges or -# enable developer mode. If you do not you may hit this error on Windows: -# -# Bazel needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -# -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_runfiles -build --enable_runfiles diff --git a/e2e/smoke/.aspect/bazelrc/performance.bazelrc b/e2e/smoke/.aspect/bazelrc/performance.bazelrc deleted file mode 100644 index fff4c7c..0000000 --- a/e2e/smoke/.aspect/bazelrc/performance.bazelrc +++ /dev/null @@ -1,38 +0,0 @@ -# Speed up all builds by not checking if output files have been modified. Lets you make changes to -# the output tree without triggering a build for local debugging. For example, you can modify -# [rules_js](https://github.com/aspect-build/rules_js) 3rd party npm packages in the output tree -# when local debugging. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/pkgcache/PackageOptions.java#L185 -build --noexperimental_check_output_files -fetch --noexperimental_check_output_files -query --noexperimental_check_output_files - -# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. -# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where -# Bazel doesn't write to the local disk cache as it treats as a remote cache. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk -build --incompatible_remote_results_ignore_disk - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --experimental_reuse_sandbox_directories - -# Do not build runfiles symlink forests for external repositories under -# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & -# sandbox creation times & prevents accidentally depending on this feature which may flip to off by -# default in the future. Note, some rules may fail under this flag, please file issues with the rule -# author. -# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles -build --nolegacy_external_runfiles - -# Some actions are always IO-intensive but require little compute. It's wasteful to put the output -# in the remote cache, it just saturates the network and fills the cache storage causing earlier -# evictions. It's also not worth sending them for remote execution. -# For actions like PackageTar it's usually faster to just re-run the work locally every time. -# You'll have to look at an execution log to figure out what other action mnemonics you care about. -# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one. -# https://bazel.build/reference/command-line-reference#flag--modify_execution_info -build --modify_execution_info=PackageTar=+no-remote diff --git a/e2e/smoke/.aspect/cli b/e2e/smoke/.aspect/cli deleted file mode 120000 index 0754375..0000000 --- a/e2e/smoke/.aspect/cli +++ /dev/null @@ -1 +0,0 @@ -../../../.aspect/cli \ No newline at end of file diff --git a/e2e/smoke/.bazelrc b/e2e/smoke/.bazelrc index 6b6c5e0..b48a27a 100644 --- a/e2e/smoke/.bazelrc +++ b/e2e/smoke/.bazelrc @@ -1,19 +1,2 @@ -# Bazel settings that apply to this repository. -# Settings that apply only to CI are in .aspect/bazelrc/ci.bazelrc - -# Import Aspect bazelrc presets -import %workspace%/.aspect/bazelrc/convenience.bazelrc -import %workspace%/.aspect/bazelrc/correctness.bazelrc -import %workspace%/.aspect/bazelrc/performance.bazelrc -import %workspace%/.aspect/bazelrc/debug.bazelrc -import %workspace%/.aspect/bazelrc/javascript.bazelrc - -### PROJECT SPECIFIC OPTIONS ### # for testing expand_template build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3" - -# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. -# This file should appear in `.gitignore` so that settings are not shared with team members. This -# should be last statement in this config so the user configuration is able to overwrite flags from -# this file. See https://bazel.build/configure/best-practices#bazelrc-file. -try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/e2e/bzlmod_write_source_files_external/WORKSPACE.bzlmod b/e2e/write_source_files/.bazelrc similarity index 100% rename from e2e/bzlmod_write_source_files_external/WORKSPACE.bzlmod rename to e2e/write_source_files/.bazelrc diff --git a/e2e/bzlmod_write_source_files_external/.bazelversion b/e2e/write_source_files/.bazelversion similarity index 100% rename from e2e/bzlmod_write_source_files_external/.bazelversion rename to e2e/write_source_files/.bazelversion diff --git a/e2e/bzlmod_write_source_files_external/BUILD.bazel b/e2e/write_source_files/BUILD.bazel similarity index 100% rename from e2e/bzlmod_write_source_files_external/BUILD.bazel rename to e2e/write_source_files/BUILD.bazel diff --git a/e2e/bzlmod_write_source_files_external/MODULE.bazel b/e2e/write_source_files/MODULE.bazel similarity index 85% rename from e2e/bzlmod_write_source_files_external/MODULE.bazel rename to e2e/write_source_files/MODULE.bazel index 4ff55c3..ce99d68 100644 --- a/e2e/bzlmod_write_source_files_external/MODULE.bazel +++ b/e2e/write_source_files/MODULE.bazel @@ -1,5 +1,5 @@ module( - name = "bzlmod_write_source_files_external", + name = "write_source_files", version = "0.0.0", compatibility_level = 1, ) diff --git a/e2e/write_source_files/WORKSPACE b/e2e/write_source_files/WORKSPACE new file mode 100644 index 0000000..b88998f --- /dev/null +++ b/e2e/write_source_files/WORKSPACE @@ -0,0 +1,12 @@ +local_repository( + name = "aspect_bazel_lib", + path = "../..", +) + +load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") + +aspect_bazel_lib_dependencies() + +load(":test_extension.bzl", "test_repo") + +test_repo(name = "test") diff --git a/e2e/write_source_files/WORKSPACE.bzlmod b/e2e/write_source_files/WORKSPACE.bzlmod new file mode 100644 index 0000000..e69de29 diff --git a/e2e/bzlmod_write_source_files_external/foobar.txt b/e2e/write_source_files/foobar.txt similarity index 100% rename from e2e/bzlmod_write_source_files_external/foobar.txt rename to e2e/write_source_files/foobar.txt diff --git a/e2e/bzlmod_write_source_files_external/test_extension.bzl b/e2e/write_source_files/test_extension.bzl similarity index 100% rename from e2e/bzlmod_write_source_files_external/test_extension.bzl rename to e2e/write_source_files/test_extension.bzl