Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ecf2750
Upgrade to Bazel 8
Jan 16, 2025
2ac6f83
Sort .bazelrc_shared
Jan 16, 2025
5a0ca84
Enable various incompatible flags
Jan 16, 2025
e6dfb38
Enable --incompatible_auto_exec_groups
Jan 17, 2025
1b4c8a7
Use the new protobuf rules
Jan 17, 2025
5101eff
Don't automatically load any language-specific symbols
Jan 17, 2025
525f47e
Enable --incompatible_config_setting_private_default_visibility
Jan 17, 2025
ce30a2e
Enable --incompatible_disallow_ctx_resolve_tools
Jan 17, 2025
a1ed056
Enable --incompatible_disallow_struct_provider_syntax
Jan 17, 2025
f2976dd
Enable worker multiplex sandboxing
Jan 17, 2025
a4ab8a3
fixup! d6f7aa51ab5 Upgraded stardoc to v0.7.2
Jan 22, 2025
3708131
Replace --experimental_strict_action_env with --incompatible_strict_a…
Jan 23, 2025
7179c32
Update rules_java
jjudd Feb 20, 2025
8ed758f
Re-enable path mapping
jjudd Feb 20, 2025
966f687
Update java_stub_template.txt to come from rules_java
jjudd Feb 20, 2025
f68c115
Fix mains_file not working with the launcher when multiplex sandboxin…
jjudd Feb 20, 2025
37db426
Update CI to 8.1.1
jjudd Feb 20, 2025
0242d13
Add skylib to tests MODULE.bazel
jjudd Feb 20, 2025
cef6a3a
Use Providers everywhere and stop using structs
jjudd Feb 24, 2025
64cda34
Re-enable worker sandbox hardening
jjudd Feb 24, 2025
03aca29
Use custom version of Bazel with the multiplex sandbox bug fix
jjudd Feb 25, 2025
5cca0e0
Fix gen-deps.sh
jjudd Feb 27, 2025
619f58c
Update Zinc to 1.10.7
jjudd Feb 27, 2025
f524a26
Change from Scala 3 Next to Scala 3 LTS
jjudd Feb 27, 2025
58c69b1
Upgrade to Scala 3 in the rule set, but not tests
jjudd Feb 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 35 additions & 31 deletions .bazelrc_shared
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
common --announce_rc
common --color=yes
# TODO: remove this when we move to Bazel 8. This is the default in Bazel 8.
common --experimental_remote_cache_eviction_retries=5

# TODO: enable path mapping when we move to Bazel 8. There is a bug in 7. See:
# https://github.com/bazelbuild/bazel/issues/23990
# In the meantime, if you need to test path mapping you should disable multiplex
# workers with the following build option:
#build --noworker_multiplex
#common --experimental_output_paths=strip
#common --modify_execution_info=CppCompile=+supports-path-mapping

build --experimental_strict_action_env
build --javacopt="-source 21 -target 21"
# Java options
build --java_language_version="21"
build --java_runtime_version="remotejdk_21"
build --javacopt="-source 21 -target 21"
build --tool_java_language_version="21"
build --tool_java_runtime_version="remotejdk_21"

# Other options
build --experimental_use_hermetic_linux_sandbox
build --experimental_worker_sandbox_hardening
build --experimental_worker_cancellation
build --experimental_worker_multiplex_sandboxing
build --strategy=worker,sandboxed,local

build --verbose_failures
build --worker_max_instances=4
build --worker_sandboxing
# Disable multiplex sandboxing because there is a bug that causes files which
# should be in the sandbox to not be. Not sure if this is a Bazel bug or a rule
# set bug. Something we need to deal with either way.
# Once we enable path mapping, we should also be able to get rid of the outgoing
# transition that we're currently relying on to prevent an explosion in the number
# of builds.
#build --experimental_worker_multiplex_sandboxing
build --experimental_worker_cancellation
build --verbose_failures

# This is disabled as it was causing some issues with some javac targets when used
# with path mapping. If that is resolved, then we can turn it back on.
#build --experimental_worker_sandbox_hardening
build --experimental_use_hermetic_linux_sandbox

test --test_output=all
common --experimental_output_paths=strip
common --modify_execution_info=CppCompile=+supports-path-mapping
common --modify_execution_info=CppModuleMap=+supports-path-mapping
common --modify_execution_info=CppArchive=+supports-path-mapping

common --announce_rc
common --color=yes
common:rules --disk_cache=.bazel_cache
common:tests --disk_cache=../.bazel_cache
common:tests --@rules_scala_annex//rules/scala:scala-toolchain=test_zinc_2_13

# These are backwards incompatible options; we should check to see if their values have been flipped
# when upgrading to new major Bazel version.
common --incompatible_auto_exec_groups
common --incompatible_autoload_externally=sh_binary # sh_binary is used by rules_jvm_external
common --incompatible_config_setting_private_default_visibility
common --incompatible_disable_native_repo_rules
common --incompatible_disable_starlark_host_transitions
common --incompatible_disable_target_provider_fields
common --incompatible_strict_action_env

# Unfortunately, this can't be enabled just yet because of
# https://github.com/bazelbuild/rules_java/issues/264
#common --incompatible_stop_exporting_language_modules

# This is disabled because rules_python (and possibly other rulesets we depend on) rely on
# deprecated `Label` APIs:
# https://github.com/bazelbuild/rules_python/blob/main/python/private/pythons_hub.bzl#L82
#common --noincompatible_enable_deprecated_label_apis

test --test_output=all
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.1
lucidsoftware/8.1.999
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04]
bazel_version: [bazelbuild/7.4.1]
bazel_version: [bazelbuild/8.1.1]
steps:
- uses: actions/checkout@v3
- uses: bazel-contrib/[email protected]
Expand Down
26 changes: 12 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module(name = "rules_scala_annex")

bazel_dep(name = "bazel_skylib", version = "1.7.1")

bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)

bazel_dep(name = "rules_java", version = "7.12.2")
bazel_dep(name = "protobuf", version = "29.3")
bazel_dep(name = "rules_java", version = "8.9.0")
bazel_dep(name = "rules_jvm_external", version = "6.5")

bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
bazel_dep(name = "rules_pkg", version = "1.0.1", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True)

register_toolchains(
"//:annex_scalafmt",
Expand All @@ -27,11 +26,11 @@ scala_2_12_version = "2.12.19"

scala_2_13_version = "2.13.15"

scala_3_version = "3.5.2"
scala_3_version = "3.3.5"

scalapb_version = "0.11.17"

zinc_version = "1.10.4"
zinc_version = "1.10.7"

annex = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
annex.install(
Expand Down Expand Up @@ -113,9 +112,8 @@ annex_proto = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
annex_proto.install(
name = "annex_proto",
artifacts = [
"com.github.os72:protoc-jar:3.11.4",
"com.thesamet.scalapb:compilerplugin_2.13:0.11.17",
"com.thesamet.scalapb:protoc-bridge_2.13:0.9.7",
"com.thesamet.scalapb:compilerplugin_2.13:1.0.0-alpha.1",
"com.thesamet.scalapb:protoc-bridge_2.13:0.9.8",
],
fetch_sources = True,
lock_file = "//:annex_proto_install.json",
Expand All @@ -127,14 +125,14 @@ annex_proto.install(
)
use_repo(annex_proto, "annex_proto")

java_launcher_version = "7.4.1"
java_launcher_version = "8.9.0"

java_launcher_template_sha = "ee4aa47ae5e639632c67be5cc0ccbc4e941a67a1b884a1ce0c4329357a4b62b2"
java_launcher_template_sha = "289d8c13a3e2680bfbe21a2c6a57cc428ecdc6a0f2c04bda4d4dc2da40311eaa"

java_stub_template_url = (
"raw.githubusercontent.com/bazelbuild/bazel/" +
"raw.githubusercontent.com/bazelbuild/rules_java/" +
java_launcher_version +
"/src/main/java/com/google/devtools/build/lib/bazel/rules/java/" +
"/java/bazel/rules/" +
"java_stub_template.txt"
)

Expand Down
Loading