Debian Codegraph @

.aspect/bazelrc/correctness.bazelrc

raw
1 # Do not upload locally executed action results to the remote cache.
2 # This should be the default for local builds so local builds cannot poison the remote cache.
3 # It should be flipped to `--remote_upload_local_results` on CI
4 # by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`.
5 # Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results
6 build --noremote_upload_local_results
7
8 # Don't allow network access for build actions in the sandbox.
9 # Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote
10 # services.
11 # Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement.
12 # Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network
13 build --sandbox_default_allow_network=false
14
15 # Warn if a test's timeout is significantly longer than the test's actual execution time.
16 # Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min).
17 # While a test's timeout should be set such that it is not flaky, a test that has a highly
18 # over-generous timeout can hide real problems that crop up unexpectedly.
19 # For instance, a test that normally executes in a minute or two should not have a timeout of
20 # ETERNAL or LONG as these are much, much too generous.
21 # Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings
22 test --test_verbose_timeout_warnings
23
24 # Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server
25 # notices when a directory changes, if you have a directory listed in the srcs of some target.
26 # Recommended when using
27 # [copy_directory](https://github.com/bazel-contrib/bazel-lib/blob/main/docs/copy_directory.md) and
28 # [rules_js](https://github.com/aspect-build/rules_js) since npm package are source directories
29 # inputs to copy_directory actions.
30 # Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args
31 startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
32
33 # Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for
34 # tests with `tags=["exclusive"]`.
35 # Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed
36 test --incompatible_exclusive_test_sandboxed
37
38 # Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment
39 # variables like `PATH` sneak into the build, which can cause massive cache misses when they change.
40 # Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the
41 # client, but note that doing so can prevent cross-user caching if a shared cache is used.
42 # Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
43 build --incompatible_strict_action_env
44
45 # Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong
46 # default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python
47 # package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the
48 # default), it is treated as false if and only if this flag is set. See
49 # https://github.com/bazelbuild/bazel/issues/10076.
50 # Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py
51 build --incompatible_default_to_explicit_init_py
52
53 # Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when
54 # attempting to use `glob()` to match files in a subdirectory that is opaque to the current package
55 # because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195.
56 # Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob
57 common --incompatible_disallow_empty_glob
58
59 # Always download coverage files for tests from the remote cache. By default, coverage files are not
60 # downloaded on test result cache hits when --remote_download_minimal is enabled, making it impossible
61 # to generate a full coverage report.
62 # Docs: https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
63 # detching remote cache results
64 test --experimental_fetch_all_coverage_outputs