diff --git a/{{ .ProjectSnake }}/MODULE.bazel b/{{ .ProjectSnake }}/MODULE.bazel index 6aaa1696..b18d0a70 100644 --- a/{{ .ProjectSnake }}/MODULE.bazel +++ b/{{ .ProjectSnake }}/MODULE.bazel @@ -12,7 +12,7 @@ bazel_dep(name = "rules_cc", version = "0.2.14") {{- end }} bazel_dep(name = "rules_multitool", version = "1.9.0") bazel_dep(name = "bazel_env.bzl", version = "0.5.0") -bazel_dep(name = "bazelrc-preset.bzl", version = "1.5.1") +bazel_dep(name = "bazelrc-preset.bzl", version = "1.6.0") # Bazel 9: Ensure transitives don't depend on rules_nodejs prior to # https://github.com/bazel-contrib/rules_nodejs/commit/1fc6b6b763c4f79994edc9edab10399f7446d8be bazel_dep(name = "rules_nodejs", version = "6.6.2") diff --git a/{{ .ProjectSnake }}/tools/preset.bazelrc b/{{ .ProjectSnake }}/tools/preset.bazelrc index f426a533..d75dba79 100644 --- a/{{ .ProjectSnake }}/tools/preset.bazelrc +++ b/{{ .ProjectSnake }}/tools/preset.bazelrc @@ -96,6 +96,15 @@ startup --host_jvm_args="-DBAZEL_TRACK_SOURCE_DIRECTORIES=1" common --incompatible_default_to_explicit_init_py # Docs: https://registry.build/flag/bazel?filter=incompatible_default_to_explicit_init_py +# Fail if Starlark files are not UTF-8 encoded. +# Introduced in Bazel 8.1, see https://github.com/bazelbuild/bazel/pull/24944 +common --incompatible_enforce_starlark_utf8="error" +# Docs: https://registry.build/flag/bazel?filter=incompatible_enforce_starlark_utf8 + +# Accept multiple --modify_execution_info flags, rather than the last flag overwriting earlier ones. +common --incompatible_modify_execution_info_additive +# Docs: https://registry.build/flag/bazel?filter=incompatible_modify_execution_info_additive + # Make builds more reproducible by using a static value for PATH and not inheriting LD_LIBRARY_PATH. # Use `--action_env=ENV_VARIABLE` if you want to inherit specific variables from the environment where Bazel runs. # Note that doing so can prevent cross-user caching if a shared cache is used.