From 4f26f4dd8f0a9be150f51f09bd9bad7cba7e8de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Leuth=C3=A4user?= <1417198+max-leuthaeuser@users.noreply.github.com> Date: Wed, 23 Sep 2026 11:54:46 +0200 Subject: [PATCH 1/2] Add common_javacopts to make_scala_rules call site The parameter is mandatory since https://github.com/joernio/bazel_tooling/pull/1 so that the javacopts for the Java portion of mixed Java/Scala targets are explicit at every call site. Values mirror java_common_opts in bazel/java.bzl. Requested in the review of https://github.com/ShiftLeftSecurity/java2cpg/pull/1106. --- MODULE.bazel | 7 +++++-- bazel/scala.bzl | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 62c41a795..24e50fba9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,12 +6,15 @@ bazel_dep(name = "rules_jvm_external", version = "7.0") bazel_dep(name = "aspect_rules_lint", version = "2.5.2") bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2") -BAZEL_TOOLING_VERSION = "4bcf42cc81b574b91699d696b504637677640871" +# Adds the mandatory common_javacopts parameter to make_scala_rules. +# TODO https://github.com/joernio/bazel_tooling/pull/1: once merged, point +# back at joernio/bazel_tooling and update to the merge commit. +BAZEL_TOOLING_VERSION = "e4b086cdb35b8709f7cfd8136dd5ad5f5e8c4acc" git_override( module_name = "bazel_tooling", commit = "{}".format(BAZEL_TOOLING_VERSION), - remote = "git@github.com:joernio/bazel_tooling.git", + remote = "git@github.com:max-leuthaeuser/bazel_tooling.git", ) bazel_dep(name = "rules_scala", version = "7.2.5") diff --git a/bazel/scala.bzl b/bazel/scala.bzl index 00a561066..78a489705 100644 --- a/bazel/scala.bzl +++ b/bazel/scala.bzl @@ -11,6 +11,14 @@ _rules = make_scala_rules( "-deprecation", "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s", ], + # Applies to the Java sources of mixed Java/Scala targets which rules_scala + # compiles in a separate Javac action that does not see the javacopts from + # bazel/java.bzl. Keep in sync with java_common_opts there. + common_javacopts = [ + "--release", + "17", + "-XepDisableAllChecks", + ], common_scala_binary_runtime_deps = [], common_scala_test_runtime_deps = [], ) From 6fae599932fcb6de3b6135f830a3efc4e12a7290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Leuth=C3=A4user?= <1417198+max-leuthaeuser@users.noreply.github.com> Date: Wed, 23 Sep 2026 12:02:51 +0200 Subject: [PATCH 2/2] Point bazel_tooling back at joernio (PR merged) --- MODULE.bazel | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 24e50fba9..dc122a102 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,15 +6,12 @@ bazel_dep(name = "rules_jvm_external", version = "7.0") bazel_dep(name = "aspect_rules_lint", version = "2.5.2") bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2") -# Adds the mandatory common_javacopts parameter to make_scala_rules. -# TODO https://github.com/joernio/bazel_tooling/pull/1: once merged, point -# back at joernio/bazel_tooling and update to the merge commit. -BAZEL_TOOLING_VERSION = "e4b086cdb35b8709f7cfd8136dd5ad5f5e8c4acc" +BAZEL_TOOLING_VERSION = "fbdfc66995360c408ecf94d34837a0355aa7ac4d" git_override( module_name = "bazel_tooling", commit = "{}".format(BAZEL_TOOLING_VERSION), - remote = "git@github.com:max-leuthaeuser/bazel_tooling.git", + remote = "git@github.com:joernio/bazel_tooling.git", ) bazel_dep(name = "rules_scala", version = "7.2.5")