-
Notifications
You must be signed in to change notification settings - Fork 19
/
.bazelrc
106 lines (89 loc) · 10.7 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
try-import %workspace%/.engflow.bazelrc
build --define=ij_product=intellij-2024.3
build --java_language_version=17 --java_runtime_version=17
build --tool_java_language_version=17 --tool_java_runtime_version=17
# Note: Use `common` for options to be applied to all applicable commands
# To update these lines, execute
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
build --deleted_packages=.bazelbsp,.bazelbsp/aspects,server/e2e/test-resources/allow-manual-targets-sync-project/manual_target,server/e2e/test-resources/android-kotlin-project/src/main,server/e2e/test-resources/android-kotlin-project/src/main/java/com/example/myapplication,server/e2e/test-resources/android-kotlin-project/src/test/java/com/example/myapplication,server/e2e/test-resources/android-project/src/main,server/e2e/test-resources/android-project/src/main/java/com/example/myapplication,server/e2e/test-resources/android-project/src/test/java/com/example/myapplication,server/e2e/test-resources/cpp-project/example,server/e2e/test-resources/enabled-rules-project/langs,server/e2e/test-resources/enabled-rules-project/scala_targets,server/e2e/test-resources/go-project,server/e2e/test-resources/go-project/example,server/e2e/test-resources/go-project/lib,server/e2e/test-resources/java-diagnostics-project,server/e2e/test-resources/kotlin-project,server/e2e/test-resources/kotlin-project/kotlinc_test,server/e2e/test-resources/kotlin-project/plugin_allopen_test,server/e2e/test-resources/local-jdk-project/example,server/e2e/test-resources/python-project/example,server/e2e/test-resources/python-project/lib,server/e2e/test-resources/python-project/test,server/e2e/test-resources/remote-jdk-project/example,server/e2e/test-resources/rust-project,server/e2e/test-resources/rust-project/example,server/e2e/test-resources/rust-project/example-lib,server/e2e/test-resources/sample-repo/environment_variables,server/e2e/test-resources/sample-repo/genrule,server/e2e/test-resources/sample-repo/java_targets,server/e2e/test-resources/sample-repo/java_targets/subpackage,server/e2e/test-resources/sample-repo/manual_target,server/e2e/test-resources/sample-repo/no_ide_target,server/e2e/test-resources/sample-repo/scala_targets,server/e2e/test-resources/sample-repo/target_with_dependency,server/e2e/test-resources/sample-repo/target_with_javac_exports,server/e2e/test-resources/sample-repo/target_with_resources,server/e2e/test-resources/sample-repo/target_without_args,server/e2e/test-resources/sample-repo/target_without_java_info,server/e2e/test-resources/sample-repo/target_without_jvm_flags,server/e2e/test-resources/sample-repo/target_without_main_class
query --deleted_packages=.bazelbsp,.bazelbsp/aspects,server/e2e/test-resources/allow-manual-targets-sync-project/manual_target,server/e2e/test-resources/android-kotlin-project/src/main,server/e2e/test-resources/android-kotlin-project/src/main/java/com/example/myapplication,server/e2e/test-resources/android-kotlin-project/src/test/java/com/example/myapplication,server/e2e/test-resources/android-project/src/main,server/e2e/test-resources/android-project/src/main/java/com/example/myapplication,server/e2e/test-resources/android-project/src/test/java/com/example/myapplication,server/e2e/test-resources/cpp-project/example,server/e2e/test-resources/enabled-rules-project/langs,server/e2e/test-resources/enabled-rules-project/scala_targets,server/e2e/test-resources/go-project,server/e2e/test-resources/go-project/example,server/e2e/test-resources/go-project/lib,server/e2e/test-resources/java-diagnostics-project,server/e2e/test-resources/kotlin-project,server/e2e/test-resources/kotlin-project/kotlinc_test,server/e2e/test-resources/kotlin-project/plugin_allopen_test,server/e2e/test-resources/local-jdk-project/example,server/e2e/test-resources/python-project/example,server/e2e/test-resources/python-project/lib,server/e2e/test-resources/python-project/test,server/e2e/test-resources/remote-jdk-project/example,server/e2e/test-resources/rust-project,server/e2e/test-resources/rust-project/example,server/e2e/test-resources/rust-project/example-lib,server/e2e/test-resources/sample-repo/environment_variables,server/e2e/test-resources/sample-repo/genrule,server/e2e/test-resources/sample-repo/java_targets,server/e2e/test-resources/sample-repo/java_targets/subpackage,server/e2e/test-resources/sample-repo/manual_target,server/e2e/test-resources/sample-repo/no_ide_target,server/e2e/test-resources/sample-repo/scala_targets,server/e2e/test-resources/sample-repo/target_with_dependency,server/e2e/test-resources/sample-repo/target_with_javac_exports,server/e2e/test-resources/sample-repo/target_with_resources,server/e2e/test-resources/sample-repo/target_without_args,server/e2e/test-resources/sample-repo/target_without_java_info,server/e2e/test-resources/sample-repo/target_without_jvm_flags,server/e2e/test-resources/sample-repo/target_without_main_class
# 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
common --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
# TODO: remove after updating to Bazel 8 (True by default)
common --incompatible_disallow_empty_glob
# 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
# TODO: Enable once https://github.com/bazelbuild/rules_java/issues/203 is solved
#build --nolegacy_external_runfiles
# Speed up all builds by not checking if external repository files have been modified.
# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244
build --noexperimental_check_external_repository_files
fetch --noexperimental_check_external_repository_files
query --noexperimental_check_external_repository_files
# 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.
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
build --reuse_sandbox_directories
# Avoid this flag being enabled by remote_download_minimal or remote_download_toplevel
# See https://meroton.com/blog/bazel-6-errors-build-without-the-bytes/
build --noexperimental_action_cache_store_output_metadata
# 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
# NB: This flag is in bazel6.bazelrc as when used in Bazel 7 is has been observed to break
# "build without the bytes" --remote_download_outputs=toplevel. See https://github.com/aspect-build/bazel-lib/pull/711
# for more info.
build --noexperimental_check_output_files
fetch --noexperimental_check_output_files
query --noexperimental_check_output_files
# build --config=engflow
# Required for rules_java > 8.0.0 working with android
# Remove after bazel 8 release - the flag has been flipped for Bazel 8, which will be out next month.
# https://github.com/bazelbuild/rules_java/issues/233
# https://github.com/JetBrains/hirschgarten/pull/92
common --experimental_rule_extension_api
# https://youtrack.jetbrains.com/issue/BAZEL-1095
# Added a new flag, --incompatible_use_plus_in_repo_names, which uses the plus character (+) instead of the tilde (~) in canonical repo names. This flag will be flipped to true in Bazel 8.0. (#23127)
# common --incompatible_use_plus_in_repo_names