bazel-contrib/rules_scala#1803 + protobuf v33.4 prebuilt protoc example
Install Bazelisk, then run the following command, and you should see:
# With Bazel 9.0.0 from `.bazelversion`, and when prefixed with
# `USE_BAZEL_VERSION=10.0.0=pre.20251208.3`:
$ bazel build :test_scala_proto
Starting local Bazel server (9.0.0) and connecting to it...
INFO: Analyzed target //:test_scala_proto
(224 packages loaded, 4667 targets configured, 30 aspect applications).
[ ...snip... ]
INFO: Found 1 target...
Target //:test_scala_proto up-to-date:
bazel-bin/test_proto_scalapb.jar
bazel-bin/test_proto_scalapb-src.jar
INFO: Elapsed time: 14.107s, Critical Path: 8.14s
INFO: 201 processes: 87 internal, 99 darwin-sandbox, 15 worker.
INFO: Build completed successfully, 201 total actions
$ USE_BAZEL_VERSION=10.0.0-pre.20251217.3 bazel build :test_scala_proto
Starting local Bazel server (10.0.0-pre.20251217.3) and connecting to it...
INFO: Analyzed target //:test_scala_proto
(202 packages loaded, 5747 targets and 30 aspects configured).
ERROR: .../external/protobuf+/upb/mem/BUILD:14:11:
Compiling upb/mem/alloc.c [for tool] failed: (Exit 1):
wrapped_clang failed: error executing CppCompile command
(from cc_library rule target @@protobuf+//upb/mem:mem)
[ ...snip... ]
clang: error: unknown argument: '--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT'
Error in child process '/usr/bin/xcrun'. 1
[ ...snip... ]
Target //:test_scala_proto failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 7.488s, Critical Path: 0.14s
INFO: 24 processes: 306 action cache hit, 23 internal, 1 darwin-sandbox.
ERROR: Build did NOT complete successfully