mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 22:55:41 +00:00
* Upgrade rules_scala 7.1.5, Scala 3.7.4, protobuf 32.1 - Update rules_scala from 7.1.1 to 7.1.5 - Update Scala from 3.7.2 to 3.7.4 - Update protobuf from 29.2 to 32.1 (required by rules_scala 7.1.5+) - Add force_version for Maven dependency conflicts (gson, errorprone, guava) - Update -Wconf pattern in tools/BUILD.bazel for Bazel 7/8 compatibility - Add -Wno-deprecated-copy-with-dtor to suppress protobuf 32.x warning Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add grpc 1.76.0, protobuf 33.0, and Bazel 7.7.1 compatibility fixes - Upgrade grpc from 1.71.0 to 1.76.0.bcr.1 (required for protobuf 33.0) - Upgrade protobuf from 32.1 to 33.0 (matches grpc 1.76.0 expectations) - Upgrade Bazel from 7.6.1 to 7.7.1 - Add single_version_override for rules_swift 3.1.2 (grpc needs 3.x, rules_apple needs 2.x) - Add --features=-module_maps workaround for grpc cf_event_engine macOS build issue Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
98 lines
3.6 KiB
Python
98 lines
3.6 KiB
Python
load("@rules_scala//scala:providers.bzl", "declare_deps_provider")
|
|
load("@rules_scala//scala:scala_toolchain.bzl", "scala_toolchain")
|
|
load("@rules_scala//scala_proto:scala_proto_toolchain.bzl", "scalapb_toolchain")
|
|
|
|
scalapb_toolchain(
|
|
name = "custom_scalapb_toolchain_impl",
|
|
opts = [
|
|
"grpc",
|
|
"flat_package",
|
|
"java_conversions",
|
|
"single_line_to_proto_string",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
toolchain(
|
|
name = "custom_scalapb_toolchain",
|
|
toolchain = ":custom_scalapb_toolchain_impl",
|
|
toolchain_type = "@rules_scala//scala_proto:toolchain_type",
|
|
)
|
|
|
|
scala_toolchain(
|
|
name = "unused_dependency_checker_error_and_opts_toolchain_impl",
|
|
scalacopts = [
|
|
"-deprecation",
|
|
"-feature",
|
|
# Scala 3 equivalent flags
|
|
"-Wvalue-discard",
|
|
"-Wunused:all",
|
|
# Treat all warnings as errors inside src, silence warnings elsewhere (ie third party deps and rules_scala)
|
|
# Also suppress duplicate flag warnings caused by rules_scala test_reporter
|
|
# Suppress warnings from external deps, generated code, and some stylistic warnings
|
|
# Suppress "unused value" warnings in test code since ScalaTest assertions work via side effects
|
|
"-Wconf:src=external/rules_scala.*/.*:silent,src=external/protobuf.*/.*:silent,msg=Flag.*set repeatedly:silent,msg=Compiler synthesis of Manifest:silent,src=.*_scalac/.*:silent,msg=interpolation uses toString:silent,msg=unused value of type org.scalatest:silent,msg=Could not verify that the method argument is transitively initialized:silent,msg=Problematic object instantiation:silent,msg=may cause initialization errors:silent",
|
|
# Enable all warnings including exhaustive pattern matching checks
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
unused_dependency_checker_mode = "error",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
toolchain(
|
|
name = "unused_dependency_checker_error_and_opts_toolchain",
|
|
toolchain = ":unused_dependency_checker_error_and_opts_toolchain_impl",
|
|
toolchain_type = "@rules_scala//scala:toolchain_type",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
declare_deps_provider(
|
|
name = "custom_grpc_deps",
|
|
deps_id = "scalapb_grpc_deps",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@grpc-java//api",
|
|
"@grpc-java//context",
|
|
"@grpc-java//core",
|
|
"@grpc-java//netty",
|
|
"@grpc-java//protobuf",
|
|
"@grpc-java//stub",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime_grpc_3",
|
|
"@maven//:io_netty_netty_buffer",
|
|
"@maven//:io_netty_netty_codec",
|
|
"@maven//:io_netty_netty_codec_http",
|
|
"@maven//:io_netty_netty_codec_http2",
|
|
"@maven//:io_netty_netty_codec_socks",
|
|
"@maven//:io_netty_netty_common",
|
|
"@maven//:io_netty_netty_handler",
|
|
"@maven//:io_netty_netty_handler_proxy",
|
|
"@maven//:io_netty_netty_resolver",
|
|
"@maven//:io_netty_netty_transport",
|
|
],
|
|
)
|
|
|
|
declare_deps_provider(
|
|
name = "custom_compile_deps",
|
|
deps_id = "scalapb_compile_deps",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
"@maven//:com_thesamet_scalapb_lenses_3",
|
|
"@maven//:com_thesamet_scalapb_scalapb_runtime_3",
|
|
"@maven//:io_grpc_grpc_protobuf",
|
|
"@maven//:org_scala_lang_scala_library",
|
|
],
|
|
)
|
|
|
|
declare_deps_provider(
|
|
name = "custom_worker_deps",
|
|
deps_id = "scalapb_worker_deps",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
"@maven//:com_thesamet_scalapb_compilerplugin_3",
|
|
"@maven//:com_thesamet_scalapb_protoc_bridge_3",
|
|
],
|
|
)
|