-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
common --noexperimental_check_external_repository_files | ||
|
||
# Don't report when the root module's lower bound for a dependency happens to be less than the resolved version. | ||
# This is expected and should NOT prompt an engineer to update our lower bound to match. | ||
# WARNING: For repository 'aspect_bazel_lib', the root module requires module version [email protected], | ||
# but got [email protected] in the resolved dependency graph. | ||
common --check_direct_dependencies=off | ||
|
||
# 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 | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Aspect recommended Bazel flags when using rules_java and rules_jvm_external | ||
|
||
# Pin java versions to desired language level | ||
# See https://bazel.build/docs/bazel-and-java#java-versions | ||
# and https://en.wikipedia.org/wiki/Java_version_history | ||
|
||
# What version of Java are the source files in this repo? | ||
# See https://bazel.build/docs/user-manual#java-language-version | ||
common --java_language_version=17 | ||
|
||
# The Java language version used to build tools that are executed during a build | ||
# See https://bazel.build/docs/user-manual#tool-java-language-version | ||
common --tool_java_language_version=17 | ||
|
||
# The version of JVM to use to execute the code and run the tests. | ||
# NB: The default value is local_jdk which is non-hermetic. | ||
# See https://bazel.build/docs/user-manual#java-runtime-version | ||
common --java_runtime_version=remotejdk_17 | ||
|
||
# The version of JVM used to execute tools that are needed during a build. | ||
# See https://bazel.build/docs/user-manual#tool-java-runtime-version | ||
common --tool_java_runtime_version=remotejdk_17 | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,19 @@ | ||
# 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 | ||
# Avoid creating a runfiles tree for binaries or tests until it is needed. | ||
# Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links | ||
# 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. | ||
build --nobuild_runfile_links | ||
|
||
# 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 | ||
# Needed prior to Bazel 8; see | ||
# https://github.com/bazelbuild/bazel/issues/20577 | ||
coverage --build_runfile_links |