Skip to content

Commit cb5c268

Browse files
authoredFeb 27, 2025
Merge pull request #78 from lucidsoftware/upgrade-to-bazel-8
Upgrade to Bazel 8
2 parents f32b0cd + 1daeb80 commit cb5c268

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+611
-849
lines changed
 

‎.bazelrc_shared

+42-23
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,63 @@
1-
common --announce_rc
2-
common --color=yes
3-
# TODO: remove this when we move to Bazel 8. This is the default in Bazel 8.
4-
common --experimental_remote_cache_eviction_retries=5
5-
6-
# TODO: enable path mapping when we move to Bazel 8. There is a bug in 7. See:
7-
# https://github.com/bazelbuild/bazel/issues/23990
8-
# In the meantime, if you need to test path mapping you should disable multiplex
9-
# workers with the following build option:
10-
#build --noworker_multiplex
11-
#common --experimental_output_paths=strip
12-
#common --modify_execution_info=CppCompile=+supports-path-mapping
13-
14-
build --experimental_strict_action_env
15-
build --javacopt="-source 21 -target 21"
1+
# Java options
162
build --java_language_version="21"
173
build --java_runtime_version="remotejdk_21"
4+
build --javacopt="-source 21 -target 21"
185
build --tool_java_language_version="21"
196
build --tool_java_runtime_version="remotejdk_21"
207

8+
# Other options
9+
build --experimental_use_hermetic_linux_sandbox
10+
build --experimental_worker_sandbox_hardening
11+
build --experimental_worker_cancellation
2112
build --strategy=worker,sandboxed,local
22-
13+
build --verbose_failures
2314
build --worker_max_instances=4
2415
build --worker_sandboxing
16+
2517
# Disable multiplex sandboxing because there is a bug that causes files which
2618
# should be in the sandbox to not be. Not sure if this is a Bazel bug or a rule
2719
# set bug. Something we need to deal with either way.
2820
# Once we enable path mapping, we should also be able to get rid of the outgoing
2921
# transition that we're currently relying on to prevent an explosion in the number
3022
# of builds.
3123
#build --experimental_worker_multiplex_sandboxing
32-
build --experimental_worker_cancellation
33-
build --verbose_failures
3424

35-
# This is disabled as it was causing some issues with some javac targets when used
36-
# with path mapping. If that is resolved, then we can turn it back on.
37-
#build --experimental_worker_sandbox_hardening
38-
build --experimental_use_hermetic_linux_sandbox
25+
# TODO: enable path mapping when we move to Bazel 8. There is a bug in 7. See:
26+
# https://github.com/bazelbuild/bazel/issues/23990
27+
# In the meantime, if you need to test path mapping you should disable multiplex
28+
# workers with the following build option:
29+
#build --noworker_multiplex
30+
#common --experimental_output_paths=strip
31+
#common --modify_execution_info=CppCompile=+supports-path-mapping
3932

40-
test --test_output=all
4133

34+
common --announce_rc
35+
common --color=yes
4236
common:rules --disk_cache=.bazel_cache
4337
common:tests --disk_cache=../.bazel_cache
4438
common:tests --@rules_scala_annex//rules/scala:scala-toolchain=test_zinc_2_13
39+
40+
# These are backwards incompatible options; we should check to see if their values have been flipped
41+
# when upgrading to new major Bazel version.
42+
common --incompatible_auto_exec_groups
43+
common --incompatible_autoload_externally=sh_binary # sh_binary is used by rules_jvm_external
44+
common --incompatible_config_setting_private_default_visibility
45+
common --incompatible_disable_native_repo_rules
46+
common --incompatible_disable_starlark_host_transitions
47+
common --incompatible_disable_target_provider_fields
48+
common --incompatible_strict_action_env
49+
50+
# Unfortunately, this can't be enabled just yet because with it enabled, we get the following error:
51+
# ERROR: Traceback (most recent call last):
52+
# File "/home/jpeterson/.cache/bazel/*/external/rules_java+/java/common/rules/java_runtime.bzl", line 197, column 48, in <toplevel>
53+
# "hermetic_static_libs": attr.label_list(
54+
# Error in label_list: Illegal argument: element in 'providers' is of unexpected type. Either all elements should be providers, or all elements should be lists of providers, but got an element of type com.google.devtools.build.lib.starlarkbuildapi.core.ContextAndFlagGuardedValue$1.
55+
#
56+
#common --incompatible_stop_exporting_language_modules
57+
58+
# This is disabled because rules_python (and possibly other rulesets we depend on) rely on
59+
# deprecated `Label` APIs:
60+
# https://github.com/bazelbuild/rules_python/blob/main/python/private/pythons_hub.bzl#L82
61+
#common --noincompatible_enable_deprecated_label_apis
62+
63+
test --test_output=all

‎.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4.1
1+
8.1.0

0 commit comments

Comments
 (0)